rpg-tools 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ h2. Installation
12
12
 
13
13
  Add to your Gemfile:
14
14
  <pre><code>
15
- gem 'rpg_tools'
15
+ gem 'rpg-tools'
16
16
  </code></pre>
17
17
  Then run:
18
18
  <pre><code>
@@ -66,10 +66,10 @@ module Tools
66
66
 
67
67
  # Returns the CheckRoll as a string. Example "2D4,1D6,1D20+3 must be greater or equal to 20."
68
68
  def to_s
69
- string = "#{@throw.to_s} #{I18n.t('rpg_tools.check_roll.must_be')} #{comparatives_text} #{@threshold}."
69
+ string = "#{@throw.to_s} #{I18n.t('rpg-tools.check_roll.must_be')} #{comparatives_text} #{@threshold}."
70
70
  if @result
71
- string << " #{I18n.t('rpg_tools.check_roll.already_checked')}"
72
- string << " #{@result[0] ? I18n.t('rpg_tools.check_roll.success') : I18n.t('rpg_tools.check_roll.failure')}"
71
+ string << " #{I18n.t('rpg-tools.check_roll.already_checked')}"
72
+ string << " #{@result[0] ? I18n.t('rpg-tools.check_roll.success') : I18n.t('rpg-tools.check_roll.failure')}"
73
73
  string << " (#{@result[1][0]})."
74
74
  end
75
75
  string
@@ -95,13 +95,13 @@ module Tools
95
95
  gtt = @greater_than_threshold
96
96
  ett = @equal_to_threshold
97
97
  if gtt and ett
98
- return I18n.t 'rpg_tools.check_roll.greater_and_equal'
98
+ return I18n.t 'rpg-tools.check_roll.greater_and_equal'
99
99
  elsif gtt and !ett
100
- return I18n.t 'rpg_tools.check_roll.greater'
100
+ return I18n.t 'rpg-tools.check_roll.greater'
101
101
  elsif !gtt and !ett
102
- return I18n.t 'rpg_tools.check_roll.less'
102
+ return I18n.t 'rpg-tools.check_roll.less'
103
103
  elsif !gtt and ett
104
- return I18n.t 'rpg_tools.check_roll.less_and_equal'
104
+ return I18n.t 'rpg-tools.check_roll.less_and_equal'
105
105
  end
106
106
  end
107
107
  end
@@ -1,5 +1,5 @@
1
1
  en:
2
- rpg_tools:
2
+ rpg-tools:
3
3
  check_roll:
4
4
  already_checked: "Has already been rolled with"
5
5
  failure: "failure"
@@ -8,4 +8,4 @@ module RPG_Tools
8
8
  end
9
9
  # reopen ActiveRecord and include all the above to make
10
10
  # them available to all our models if they want it
11
- require 'rpg_tools/engine'
11
+ require 'rpg-tools/engine'
@@ -0,0 +1,4 @@
1
+ module RPG_Tools
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rpg-tools"
3
- s.version = "0.2.1"
3
+ s.version = "0.2.2"
4
4
  s.authors = ["Eduardo Casanova Cuesta"]
5
5
  s.summary = "RPG Tools is a compilation of helpful tools when developing a Role Playing Game (RPG). For now the gem has three classes: Die, Throw and CheckRoll. "
6
6
  s.description = "RPG Tools is a compilation of helpful tools when developing a Role Playing Game (RPG). For now the gem has three classes: Die, Throw and CheckRoll."
@@ -10,21 +10,21 @@ Gem::Specification.new do |s|
10
10
 
11
11
  # Gem dependencies
12
12
  #
13
- s.add_runtime_dependency('rails', '~> 3.0.0')
13
+ s.add_runtime_dependency 'rails', '~> 3.0.0'
14
14
 
15
15
  # Development Gem dependencies
16
16
  #
17
17
  # Testing database
18
- s.add_development_dependency('sqlite3-ruby')
18
+ s.add_development_dependency 'sqlite3-ruby'
19
19
  # Debugging
20
20
  if RUBY_VERSION < '1.9'
21
- s.add_development_dependency('ruby-debug', '~> 0.10.3')
21
+ s.add_development_dependency 'ruby-debug'
22
22
  end
23
23
  # Specs
24
- s.add_development_dependency('rspec-rails', '~> 2.6.1')
24
+ s.add_development_dependency 'rspec-rails'
25
25
  # Fixtures
26
- s.add_development_dependency('factory_girl', '~> 1.3.2')
26
+ s.add_development_dependency 'factory_girl'
27
27
  # Integration testing
28
- s.add_development_dependency('capybara', '~> 1.0.1')
28
+ s.add_development_dependency 'capybara'
29
29
  end
30
30
 
@@ -7,7 +7,7 @@ require "action_view/railtie"
7
7
  require "action_mailer/railtie"
8
8
 
9
9
  Bundler.require
10
- require "rpg_tools"
10
+ require "rpg-tools"
11
11
 
12
12
  module Dummy
13
13
  class Application < Rails::Application
@@ -1,7 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
2
 
3
-
4
-
5
3
  describe Tools::CheckRoll do
6
4
  describe "basic funtionality" do
7
5
  before do
@@ -60,7 +58,7 @@ describe Tools::CheckRoll do
60
58
  end
61
59
 
62
60
  it "should turn a CheckRoll into a String" do
63
- string = "#{@throw.to_s} #{I18n.t('rpg_tools.check_roll.must_be')} #{I18n.t('rpg_tools.check_roll.greater_and_equal')} #{@check_roll.threshold}."
61
+ string = "#{@throw.to_s} #{I18n.t('rpg-tools.check_roll.must_be')} #{I18n.t('rpg-tools.check_roll.greater_and_equal')} #{@check_roll.threshold}."
64
62
  assert @check_roll.to_s.eql? string
65
63
  end
66
64
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpg-tools
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eduardo Casanova Cuesta
@@ -53,14 +53,12 @@ dependencies:
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
- - - ~>
56
+ - - ">="
57
57
  - !ruby/object:Gem::Version
58
- hash: 49
58
+ hash: 3
59
59
  segments:
60
60
  - 0
61
- - 10
62
- - 3
63
- version: 0.10.3
61
+ version: "0"
64
62
  type: :development
65
63
  name: ruby-debug
66
64
  version_requirements: *id003
@@ -69,14 +67,12 @@ dependencies:
69
67
  requirement: &id004 !ruby/object:Gem::Requirement
70
68
  none: false
71
69
  requirements:
72
- - - ~>
70
+ - - ">="
73
71
  - !ruby/object:Gem::Version
74
- hash: 21
72
+ hash: 3
75
73
  segments:
76
- - 2
77
- - 6
78
- - 1
79
- version: 2.6.1
74
+ - 0
75
+ version: "0"
80
76
  type: :development
81
77
  name: rspec-rails
82
78
  version_requirements: *id004
@@ -85,14 +81,12 @@ dependencies:
85
81
  requirement: &id005 !ruby/object:Gem::Requirement
86
82
  none: false
87
83
  requirements:
88
- - - ~>
84
+ - - ">="
89
85
  - !ruby/object:Gem::Version
90
- hash: 31
86
+ hash: 3
91
87
  segments:
92
- - 1
93
- - 3
94
- - 2
95
- version: 1.3.2
88
+ - 0
89
+ version: "0"
96
90
  type: :development
97
91
  name: factory_girl
98
92
  version_requirements: *id005
@@ -101,14 +95,12 @@ dependencies:
101
95
  requirement: &id006 !ruby/object:Gem::Requirement
102
96
  none: false
103
97
  requirements:
104
- - - ~>
98
+ - - ">="
105
99
  - !ruby/object:Gem::Version
106
- hash: 21
100
+ hash: 3
107
101
  segments:
108
- - 1
109
102
  - 0
110
- - 1
111
- version: 1.0.1
103
+ version: "0"
112
104
  type: :development
113
105
  name: capybara
114
106
  version_requirements: *id006
@@ -133,12 +125,9 @@ files:
133
125
  - app/models/tools/die.rb
134
126
  - app/models/tools/throw.rb
135
127
  - config/locales/en.yml
136
- - lib/generators/rpg_tools/install_generator.rb
137
- - lib/generators/rpg_tools/templates/initializer.rb
138
- - lib/rpg_tools.rb
139
- - lib/rpg_tools/engine.rb
140
- - rpg_tools.gemspec
141
- - spec/dummy/Gemfile
128
+ - lib/rpg-tools.rb
129
+ - lib/rpg-tools/engine.rb
130
+ - rpg-tools.gemspec
142
131
  - spec/dummy/Rakefile
143
132
  - spec/dummy/app/controllers/application_controller.rb
144
133
  - spec/dummy/app/helpers/application_helper.rb
@@ -1,21 +0,0 @@
1
- class RPG_Tools::InstallGenerator < Rails::Generators::Base #:nodoc:
2
- include Rails::Generators::Migration
3
-
4
- source_root File.expand_path('../templates', __FILE__)
5
-
6
- require 'rails/generators/active_record'
7
-
8
- def self.next_migration_number(dirname)
9
- ActiveRecord::Generators::Base.next_migration_number(dirname)
10
- end
11
-
12
- def create_initializer_file
13
- template 'initializer.rb', 'config/initializers/rpg_tools.rb'
14
- end
15
-
16
- def create_migration_file
17
- require 'rake'
18
- Rails.application.load_tasks
19
- Rake::Task['rpg_tools_engine:install:migrations'].invoke
20
- end
21
- end
@@ -1,3 +0,0 @@
1
- RPG_Tools.setup do |config|
2
-
3
- end
@@ -1,11 +0,0 @@
1
- module RPG_Tools
2
- class Engine < Rails::Engine
3
- =begin
4
- initializer "rpg_tools.models.*whatever*" do
5
- ActiveSupport.on_load(:active_record) do
6
- include RPG_Tools::Models::Whatever
7
- end
8
- end
9
- =end
10
- end
11
- end
@@ -1,6 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rpg_tools', :path => '../../../rpg_tools'
4
-
5
- gem 'mysql', '2.8.1'
6
-