on_exactitude_in_science 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 166e5670770da91c03c9b16de75d883c8a0d5a48
4
+ data.tar.gz: 2f507a0d20df6ade84f2c4f4107cfeaa0c73c53a
5
+ SHA512:
6
+ metadata.gz: 504ef477c001dbaad0d22e7a92630940049206855a7666e98b23788a45cf52bbdb4f0ea00766503a69ee4bfdbdaa0c788222ac821ea7112047a087ded24f93f3
7
+ data.tar.gz: 45241b42228c572414819bfa21469cde5e2b4ba5085102a45bd0db7c640bd695dd862f477149764bdc75e39ab747388d8fb25f2993c07527168ca75ec1229f40
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in on_exactitude_in_science.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Cole Willsea
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # OnExactitudeInScience
2
+
3
+ Extends Ruby to critically engage with On Exactitude in Science by Jorge Louis Borges
4
+
5
+ If the user attempts to call a method on any object, where the name of that method corresponds directly to the main text of On Exactitude in Science, then Ruby will return the formatted text of On Exactitude in Science for your enjoyment
6
+
7
+ ## CORRECT
8
+ $ gem install on_exactitude_in_science
9
+ $ irb
10
+ irb(...)> require 'on_exactitude_in_science'
11
+ irb(...)> puts in_that_empire_the_art_of_cartography_attained_such_perfection_that_the_map_of_a_single_province_occupied_the_entirety_of_a_city_and_the_map_of_the_empire_the_entirety_of_a_province_in_time_those_unconscionable_maps_no_longer_satisfied_and_the_cartographers_guilds_struck_a_map_of_the_empire_whose_size_was_that_of_the_empire_and_which_coincided_point_for_point_with_it_the_following_generations_who_were_not_so_fond_of_the_study_of_cartography_as_their_forebears_had_been_saw_that_that_vast_map_was_useless_and_not_without_some_pitilessness_was_it_that_they_delivered_it_up_to_the_inclemencies_of_sun_and_winters_in_the_deserts_of_the_west_still_today_there_are_tattered_ruins_of_that_map_inhabited_by_animals_and_beggars_in_all_the_land_there_is_no_other_relic_of_the_disciplines_of_geography
12
+ On Exactitude in Science
13
+ Jorge Luis Borges, Collected Fictions, translated by Andrew Hurley.
14
+
15
+ …In that Empire, the Art of Cartography attained such Perfection that the map of a
16
+ single Province occupied the entirety of a City, and the map of the Empire, the entirety
17
+ of a Province. In time, those Unconscionable Maps no longer satisfied, and the
18
+ Cartographers Guilds struck a Map of the Empire whose size was that of the Empire, and
19
+ which coincided point for point with it. The following Generations, who were not so
20
+ fond of the Study of Cartography as their Forebears had been, saw that that vast Map
21
+ was Useless, and not without some Pitilessness was it, that they delivered it up to the
22
+ Inclemencies of Sun and Winters. In the Deserts of the West, still today, there are
23
+ Tattered Ruins of that Map, inhabited by Animals and Beggars; in all the Land there is
24
+ no other Relic of the Disciplines of Geography.
25
+ —Suarez Miranda,Viajes devarones prudentes, Libro IV,Cap. XLV, Lerida, 1658")
26
+ => nil
27
+
28
+ ## INCORRECT
29
+
30
+ irb(...)> puts in_that_CASTLE_the_art_of_SCIENCE_attained_such_FAILURE_that_the_map_of_a_TON_OF_province.....etc.
31
+ NameError: undefined local variable or method `in_that_CASTLE_the_art_of_SCIENCE_attained_such_FAILURE_that_the_map_of_a_TON_OF_province_.........etc.
32
+
33
+
34
+
35
+
36
+
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require "rake/testtask"
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.test_files = FileList['test/*_test.rb']
7
+ end
8
+
9
+ task default: :test
@@ -0,0 +1,24 @@
1
+ require "on_exactitude_in_science/version"
2
+
3
+ def method_missing(m, *args, &block)
4
+ if m === :in_that_empire_the_art_of_cartography_attained_such_perfection_that_the_map_of_a_single_province_occupied_the_entirety_of_a_city_and_the_map_of_the_empire_the_entirety_of_a_province_in_time_those_unconscionable_maps_no_longer_satisfied_and_the_cartographers_guilds_struck_a_map_of_the_empire_whose_size_was_that_of_the_empire_and_which_coincided_point_for_point_with_it_the_following_generations_who_were_not_so_fond_of_the_study_of_cartography_as_their_forebears_had_been_saw_that_that_vast_map_was_useless_and_not_without_some_pitilessness_was_it_that_they_delivered_it_up_to_the_inclemencies_of_sun_and_winters_in_the_deserts_of_the_west_still_today_there_are_tattered_ruins_of_that_map_inhabited_by_animals_and_beggars_in_all_the_land_there_is_no_other_relic_of_the_disciplines_of_geography
5
+ <<-txt
6
+ On Exactitude in Science
7
+ Jorge Luis Borges, Collected Fictions, translated by Andrew Hurley.
8
+
9
+ …In that Empire, the Art of Cartography attained such Perfection that the map of a
10
+ single Province occupied the entirety of a City, and the map of the Empire, the entirety
11
+ of a Province. In time, those Unconscionable Maps no longer satisfied, and the
12
+ Cartographers Guilds struck a Map of the Empire whose size was that of the Empire, and
13
+ which coincided point for point with it. The following Generations, who were not so
14
+ fond of the Study of Cartography as their Forebears had been, saw that that vast Map
15
+ was Useless, and not without some Pitilessness was it, that they delivered it up to the
16
+ Inclemencies of Sun and Winters. In the Deserts of the West, still today, there are
17
+ Tattered Ruins of that Map, inhabited by Animals and Beggars; in all the Land there is
18
+ no other Relic of the Disciplines of Geography.
19
+ —Suarez Miranda,Viajes devarones prudentes, Libro IV,Cap. XLV, Lerida, 1658")
20
+ txt
21
+ else
22
+ super
23
+ end
24
+ end
@@ -0,0 +1,3 @@
1
+ module OnExactitudeInScience
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'on_exactitude_in_science/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "on_exactitude_in_science"
8
+ spec.version = OnExactitudeInScience::VERSION
9
+ spec.authors = ["Cole Willsea"]
10
+ spec.email = ["coleww@gmail.com"]
11
+ spec.summary = %q{Extends Ruby to engage with the work of Jorge Louis Borges}
12
+ spec.description = %q{Allows user to access the text of 'On Exactitude In Science' by calling a method on any object wherein the method name is a symbol-ized representation of the text of 'On Exactitude In Science'.}
13
+ spec.homepage = "https://github.com/coleww/on_exactitude_in_science"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency 'test_construct'
24
+ spec.add_development_dependency 'minitest'
25
+ end
@@ -0,0 +1,34 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/autorun'
3
+ require 'minitest/pride'
4
+
5
+ require_relative "../lib/on_exactitude_in_science.rb"
6
+
7
+
8
+ class TestOnExactitudeInScience < MiniTest::Test
9
+
10
+ def test_it_tells_the_user_the_story_if_user_attempts_to_call_the_text_of_the_story_as_a_method_name_at_runtime
11
+ assert_equal in_that_empire_the_art_of_cartography_attained_such_perfection_that_the_map_of_a_single_province_occupied_the_entirety_of_a_city_and_the_map_of_the_empire_the_entirety_of_a_province_in_time_those_unconscionable_maps_no_longer_satisfied_and_the_cartographers_guilds_struck_a_map_of_the_empire_whose_size_was_that_of_the_empire_and_which_coincided_point_for_point_with_it_the_following_generations_who_were_not_so_fond_of_the_study_of_cartography_as_their_forebears_had_been_saw_that_that_vast_map_was_useless_and_not_without_some_pitilessness_was_it_that_they_delivered_it_up_to_the_inclemencies_of_sun_and_winters_in_the_deserts_of_the_west_still_today_there_are_tattered_ruins_of_that_map_inhabited_by_animals_and_beggars_in_all_the_land_there_is_no_other_relic_of_the_disciplines_of_geography, <<-txt
12
+ On Exactitude in Science
13
+ Jorge Luis Borges, Collected Fictions, translated by Andrew Hurley.
14
+
15
+ …In that Empire, the Art of Cartography attained such Perfection that the map of a
16
+ single Province occupied the entirety of a City, and the map of the Empire, the entirety
17
+ of a Province. In time, those Unconscionable Maps no longer satisfied, and the
18
+ Cartographers Guilds struck a Map of the Empire whose size was that of the Empire, and
19
+ which coincided point for point with it. The following Generations, who were not so
20
+ fond of the Study of Cartography as their Forebears had been, saw that that vast Map
21
+ was Useless, and not without some Pitilessness was it, that they delivered it up to the
22
+ Inclemencies of Sun and Winters. In the Deserts of the West, still today, there are
23
+ Tattered Ruins of that Map, inhabited by Animals and Beggars; in all the Land there is
24
+ no other Relic of the Disciplines of Geography.
25
+ —Suarez Miranda,Viajes devarones prudentes, Libro IV,Cap. XLV, Lerida, 1658")
26
+ txt
27
+ end
28
+
29
+ def test_it_does_not_tell_such_a_story_even_if_the_user_almost_has_the_method_name_exactly_correct_or_even_if_the_user_is_in_dire_need_of_such_knowledge
30
+ assert_raises NameError do
31
+ in_that_empire_the_art_of_cartography_attained_such_perfection_that_the_map_of_a_single_province_occupied_the_entirety_of_a_city_and_the_map_of_the_empire_the_entirety_of_a_province_in_time_those_unconscionable_maps_no_longer_satisfied_and_the_cartographers_guilds_struck_a_map_of_the_empire_whose_size_was_that_of_the_empire_and_which_coincided_point_for_point_with_it_the_following_generations_who_were_not_so_fond_of_the_study_of_cartography_as_their_forebears_had_been_saw_that_that_vast_map_was_useless_and_not_without_some_pitilessness_was_it_that_they_delivered_it_up_to_the_inclemencies_of_sun_and_winters_in_the_deserts_of_the_west_still_today_there_are_tattered_ruins_of_that_map_inhabited_by_animals_and_beggars_in_all_the_land_there_is_no_other_relic_of_the_disciplines_of_science
32
+ end
33
+ end
34
+ end
metadata ADDED
@@ -0,0 +1,112 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: on_exactitude_in_science
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Cole Willsea
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-09-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: test_construct
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Allows user to access the text of 'On Exactitude In Science' by calling
70
+ a method on any object wherein the method name is a symbol-ized representation of
71
+ the text of 'On Exactitude In Science'.
72
+ email:
73
+ - coleww@gmail.com
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - .gitignore
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - lib/on_exactitude_in_science.rb
84
+ - lib/on_exactitude_in_science/version.rb
85
+ - on_exactitude_in_science.gemspec
86
+ - test/on_exactitude_in_science_test.rb
87
+ homepage: https://github.com/coleww/on_exactitude_in_science
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - '>='
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubyforge_project:
107
+ rubygems_version: 2.3.0
108
+ signing_key:
109
+ specification_version: 4
110
+ summary: Extends Ruby to engage with the work of Jorge Louis Borges
111
+ test_files:
112
+ - test/on_exactitude_in_science_test.rb