crucigrama 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+
5
+ gem "activesupport", "~> 3.1.0"
6
+ gem "multi_json", "~> 1.0.3"
7
+
8
+ # Add dependencies to develop your gem here.
9
+ # Include everything needed to run rake, tests, features, etc.
10
+ group :development do
11
+ gem "rspec", "~> 2.3.0"
12
+ gem "yard", "~> 0.6.0"
13
+ gem "cucumber", ">= 0"
14
+ gem "bundler", "~> 1.0.0"
15
+ gem "jeweler", "~> 1.6.4"
16
+ gem 'simplecov', :require => false
17
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,50 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (3.1.4)
5
+ multi_json (~> 1.0)
6
+ builder (3.0.0)
7
+ cucumber (1.1.9)
8
+ builder (>= 2.1.2)
9
+ diff-lcs (>= 1.1.2)
10
+ gherkin (~> 2.9.0)
11
+ json (>= 1.4.6)
12
+ term-ansicolor (>= 1.0.6)
13
+ diff-lcs (1.1.3)
14
+ gherkin (2.9.3)
15
+ json (>= 1.4.6)
16
+ git (1.2.5)
17
+ jeweler (1.6.4)
18
+ bundler (~> 1.0)
19
+ git (>= 1.2.5)
20
+ rake
21
+ json (1.6.6)
22
+ multi_json (1.0.4)
23
+ rake (0.9.2.2)
24
+ rspec (2.3.0)
25
+ rspec-core (~> 2.3.0)
26
+ rspec-expectations (~> 2.3.0)
27
+ rspec-mocks (~> 2.3.0)
28
+ rspec-core (2.3.1)
29
+ rspec-expectations (2.3.0)
30
+ diff-lcs (~> 1.1.2)
31
+ rspec-mocks (2.3.0)
32
+ simplecov (0.6.1)
33
+ multi_json (~> 1.0)
34
+ simplecov-html (~> 0.5.3)
35
+ simplecov-html (0.5.3)
36
+ term-ansicolor (1.0.7)
37
+ yard (0.6.8)
38
+
39
+ PLATFORMS
40
+ ruby
41
+
42
+ DEPENDENCIES
43
+ activesupport (~> 3.1.0)
44
+ bundler (~> 1.0.0)
45
+ cucumber
46
+ jeweler (~> 1.6.4)
47
+ multi_json (~> 1.0.3)
48
+ rspec (~> 2.3.0)
49
+ simplecov
50
+ yard (~> 0.6.0)
data/LICENSE.txt ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2011-2012 Pablo Baños López
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,25 @@
1
+ = crucigrama
2
+
3
+ Crucigrama is a library for the generation of crosswords. The gem includes as well a simple command line tool that, making use of the
4
+ library, can generate and print crosswords.
5
+
6
+ == Contributing to crucigrama
7
+
8
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
9
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
10
+ * Fork the project
11
+ * Start a feature/bugfix branch
12
+ * Commit and push until you are happy with your contribution
13
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
14
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
15
+
16
+ == Copyright
17
+
18
+ Copyright (c) 2011-2012 Pablo Baños López
19
+
20
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
+
data/Rakefile ADDED
@@ -0,0 +1,48 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "crucigrama"
18
+ gem.homepage = "http://github.com/pbanos/crucigrama"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Ruby library for the generation of crosswords}
21
+ gem.description = File.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
22
+ gem.email = "pbl1986@gmail.com"
23
+ gem.authors = ["Pablo Baños López"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rspec/core'
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.pattern = FileList['spec/**/*_spec.rb']
32
+ end
33
+
34
+ namespace :spec do
35
+ desc "Create rspec coverage"
36
+ task :coverage do
37
+ ENV['COVERAGE'] = 'true'
38
+ Rake::Task["spec"].execute
39
+ end
40
+ end
41
+
42
+ require 'cucumber/rake/task'
43
+ Cucumber::Rake::Task.new(:features)
44
+
45
+ task :default => :spec
46
+
47
+ require 'yard'
48
+ YARD::Rake::YardocTask.new
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/bin/crucigrama ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH << File.join(File.dirname(File.dirname(__FILE__)),'lib')
4
+
5
+ require 'crucigrama/cli'
6
+ require 'crucigrama/cli/generate'
7
+ require 'crucigrama/cli/print'
8
+
9
+ Crucigrama::CLI.cli_command = "crucigrama"
10
+
11
+ Crucigrama::CLI.run *ARGV
@@ -0,0 +1 @@
1
+ {"dimensions":{"horizontal":10,"vertical":10},"grid":"confidente\nali#nuño#n\nsantamente\nu#f#di##a#\nisotermico\ns#m#c#o#el\ntrabuquete\nion#a#s###\ncai#desuso\no#atole#ox\n","definitions":{"horizontal":{"0":{"0":"Al que se le confia un secreto"}}}}
@@ -0,0 +1 @@
1
+ {"dimensions":{"horizontal":10,"vertical":10},"grid":"insalvable\nn#u###s#i#\narchivolta\nc#i#n#llar\nalargadera\nb#m#era##n\napernador#\nb#n#ira#os\nlutea#rico\nefe#ro#nen\n","definitions":{"horizontal":{"0":{"0":"Que no se puede salvar"},"2":{"0":"Roscas o molduras que forman una serie de arcos concéntricos decorando el arco de las portadas medievales"},"3":{"6":"Fogón de la cocina"},"4":{"0":"Pieza que, acoplada a una cosa, sirve para alargarla"},"5":{"4":"Cada uno de los grandes períodos de la evolución geológica o cósmica"},"6":{"0":"Que apierna"},"7":{"4":"Pasión del alma, que causa indignación y enojo","8":"Pronombre personal"},"8":{"0":"De lodo", "6":"Adinerado, hacendado o acaudalado"},"9":{"0":"Nombre de una de las diez primeras letras del abecedario","4":"Letra del alfabeto griego","7":"Apócope de nene"}},"vertical":{"0":{"0":"Que no se acaba"},"1":{"8":"Interjección que expresa cansancio"},"2":{"0":"De forma sucia"},"4":{"2":"Trazar o inventar ingeniosamente"},"5":{"4":"Remover la tierra haciendo en ella surcos con el arado"},"6":{"0":"Tomar a sueldo, asalariar"},"7":{"2":"Forma en desuso del pronombre le","8":"Introduce locuciones latinas usadas en español"},"8":{"0":"Hacer un sacrificio agradable a la divinidad","6":"Acción y efecto de rozar o rozarse"},"9":{"2":"Endrino (de origen vasco)","7":"Sonido que afecta agradablemente al oído, con especialidad el que se hace con arte"}}}}
@@ -0,0 +1 @@
1
+ {"dimensions":{"horizontal":10,"vertical":10},"grid":"examinador\nn#b#n#j#fo\ntragoneria\na#r#c###t#\npirquinear\nisa#l#et#u\nzangamanga\na#c#d#reo#\ndrago#coca\na#r#ria#ex\n","definitions":{"horizontal":{"0":{"0":"El que examina"},"1":{"8":"Apócope de fofo"},"2":{"0":"Vicio del tragón"},"4":{"0":"En Chile, dar a pirquén"},"5":{"0":"Canto y baile típicos de las islas Canarias","6":"Conjunción copulativa en latín"},"6":{"0":"Treta, ardid"},"7":{"6":"Persona que por haber cometido una culpa merece castigo"},"8":{"0":"Animal fabuloso al que se atribuye forma de serpiente muy corpulenta, con pies y alas, y de extraña fiereza y voracidad","6":"Masa redonda de harina"},"9":{"4":"Penetración que forma el mar en la costa, debida a la sumersión de la parte litoral de una cuenca fluvial de laderas más o menos abruptas","8":"Que fue y ha dejado de serlo"}},"vertical":{"1":{"4":"Diminutivo de Isabel"},"0":{"0":"Conjunto de cosas que cubren el suelo"},"2":{"0":"Dicho de la erosión o de la acción de los elementos: Formar barrancos en un terreno"},"4":{"0":"Que inocula"},"6":{"0":"Achaque, enfermedad habitual","4":"Jefe de armada griego o romano"},"7":{"4":"Perteneciente o relativo al volcán Etna, en Sicilia"},"8":{"0":"Roca compuesta de feldespato, piroxena y nódulos calizos o cuarzosos, y de color y textura variables","6":"Acción y efecto de gozar"},"9":{"0":"Pieza gruesa y curva, de madera o hierro, que forma la proa de la nave","4":"Calle de un pueblo","8":"Interjección en desuso usada para expresar dolor"}}}}