gemsmith 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,11 @@
1
+ = v1.4.0
2
+
3
+ * Added Travis CI templates for Rails build matrix that can support multiple version tests.
4
+ * Added vendor files to gemspec template so they are included when building a new gem (especially Rails related).
5
+ * Moved library requirements within the Rails conditional check so that requirements are only loaded if Rails is detected.
6
+ * Modified the RSpec development dependency so that if Rails is detected, the rspec-rails gem is included instead.
7
+ * Changed the Rails default version to 3.2.0.
8
+
1
9
  = v1.3.0
2
10
 
3
11
  * Specified Thor+ 0.2.x version dependency.
data/README.rdoc CHANGED
@@ -54,7 +54,7 @@ If no options are configured, then the defaults are as follows:
54
54
  github_user: <github user>
55
55
  year: <current year>
56
56
  ruby_version: 1.9.0
57
- rails_version: 3.1.0
57
+ rails_version: 3.2.0
58
58
 
59
59
  = Usage
60
60
 
data/lib/gemsmith/cli.rb CHANGED
@@ -70,6 +70,12 @@ module Gemsmith
70
70
  template File.join("lib", "generators", "gem", "install", "USAGE.tmp"), File.join(target_path, "lib", "generators", gem_name, "install", "USAGE"), template_options
71
71
  template File.join("lib", "generators", "gem", "upgrade", "upgrade_generator.rb.tmp"), File.join(target_path, "lib", "generators", gem_name, "upgrade", "upgrade_generator.rb"), template_options
72
72
  template File.join("lib", "generators", "gem", "upgrade", "USAGE.tmp"), File.join(target_path, "lib", "generators", gem_name, "upgrade", "USAGE"), template_options
73
+ # Travis CI (optional).
74
+ if template_options[:travis]
75
+ template File.join("gemfiles", "rails-3.0.x.gemfile.tmp"), File.join(target_path, "gemfiles", "rails-3.0.x.gemfile"), template_options
76
+ template File.join("gemfiles", "rails-3.1.x.gemfile.tmp"), File.join(target_path, "gemfiles", "rails-3.1.x.gemfile"), template_options
77
+ template File.join("gemfiles", "rails-3.2.x.gemfile.tmp"), File.join(target_path, "gemfiles", "rails-3.2.x.gemfile"), template_options
78
+ end
73
79
  end
74
80
 
75
81
  # RSpec (optional).
@@ -165,7 +171,7 @@ module Gemsmith
165
171
  github_user: (settings[:github_user] || Gemsmith::Kit.git_config_value("github.user") || "unknown"),
166
172
  year: (settings[:year] || Time.now.year),
167
173
  ruby_version: (settings[:ruby_version] || "1.9.0"),
168
- rails_version: (settings[:rails_version] || "3.1.0"),
174
+ rails_version: (settings[:rails_version] || "3.2.0"),
169
175
  post_install_message: settings[:post_install_message],
170
176
  bin: (options[:bin] || false),
171
177
  rails: (options[:rails] || false),
@@ -25,16 +25,17 @@ Gem::Specification.new do |s|
25
25
  s.add_dependency "rails", "~> <%= config[:rails_version] %>"
26
26
  <%- end -%>
27
27
  <%- if config[:travis] -%>
28
- s.add_development_dependency "rake"
28
+ s.add_development_dependency "rake"
29
29
  <%- end -%>
30
30
  <%- if config[:rspec] -%>
31
- s.add_development_dependency "rspec"
31
+ <%- rspec_gem = config[:rails] ? "rspec-rails" : "rspec" -%>
32
+ s.add_development_dependency "<%= rspec_gem %>"
32
33
  <%- end -%>
33
34
  <%- if config[:bin] -%>
34
35
  s.add_development_dependency "aruba"
35
36
  <%- end -%>
36
-
37
- s.files = Dir["lib/**/*"]
37
+
38
+ s.files = Dir["lib/**/*", "vendor/**/*"]
38
39
  s.extra_rdoc_files = Dir["README*", "CHANGELOG*", "LICENSE*"]
39
40
  <%- if config[:bin] -%>
40
41
  s.executables << "<%= config[:gem_name] %>"
@@ -0,0 +1,5 @@
1
+ source :rubygems
2
+
3
+ gem "rails", "~> 3.0.0"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source :rubygems
2
+
3
+ gem "rails", "~> 3.1.0"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,5 @@
1
+ source :rubygems
2
+
3
+ gem "rails", "~> 3.2.0"
4
+
5
+ gemspec path: "../"
@@ -1,16 +1,15 @@
1
- # Dependencies
2
1
  require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "version.rb"
3
- <%- if config[:rails] -%>
4
- require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "active_record", "class_methods.rb"
5
- require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "active_record", "instance_methods.rb"
6
- require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_view", "instance_methods.rb"
7
- require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_controller", "class_methods.rb"
8
- require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_controller", "instance_methods.rb"
9
- <%- end -%>
10
2
 
11
3
  <%- if config[:rails] -%>
12
4
  # Rails Enhancements
13
5
  if defined? Rails
6
+ # Dependencies
7
+ require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "active_record", "class_methods.rb"
8
+ require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "active_record", "instance_methods.rb"
9
+ require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_view", "instance_methods.rb"
10
+ require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_controller", "class_methods.rb"
11
+ require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_controller", "instance_methods.rb"
12
+
14
13
  # Model
15
14
  if defined? ActiveRecord
16
15
  ActiveRecord::Base.send :include, <%= config[:gem_class] %>::ActiveRecord
@@ -2,4 +2,10 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ <%- if config[:rails] -%>
6
+ gemfile:
7
+ - gemfiles/rails-3.0.x.gemfile
8
+ - gemfiles/rails-3.1.x.gemfile
9
+ - gemfiles/rails-3.2.x.gemfile
10
+ <%- end -%>
5
11
  script: bundle exec rspec spec
@@ -1,3 +1,3 @@
1
1
  module Gemsmith
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemsmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-14 00:00:00.000000000Z
12
+ date: 2012-01-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70314477299460 !ruby/object:Gem::Requirement
16
+ requirement: &70142827478420 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,21 @@ dependencies:
21
21
  version: 0.14.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70314477299460
24
+ version_requirements: *70142827478420
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor_plus
27
- requirement: &70314477299000 !ruby/object:Gem::Requirement
27
+ requirement: &70142827477960 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
31
31
  - !ruby/object:Gem::Version
32
- version: 0.2.0
32
+ version: 0.3.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70314477299000
35
+ version_requirements: *70142827477960
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &70314477298620 !ruby/object:Gem::Requirement
38
+ requirement: &70142827477580 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70314477298620
46
+ version_requirements: *70142827477580
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70314477298160 !ruby/object:Gem::Requirement
49
+ requirement: &70142827477120 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70314477298160
57
+ version_requirements: *70142827477120
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: aruba
60
- requirement: &70314477297740 !ruby/object:Gem::Requirement
60
+ requirement: &70142827476700 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70314477297740
68
+ version_requirements: *70142827476700
69
69
  description: ! 'Ruby gem skeleton generation for the professional gemsmith. Includes
70
70
  custom settings, binary, Ruby on Rails, and RSpec support. '
71
71
  email: brooke@redalchemist.com
@@ -86,6 +86,9 @@ files:
86
86
  - lib/gemsmith/templates/Rakefile.tmp
87
87
  - lib/gemsmith/templates/bin/gem.tmp
88
88
  - lib/gemsmith/templates/gem.gemspec.tmp
89
+ - lib/gemsmith/templates/gemfiles/rails-3.0.x.gemfile.tmp
90
+ - lib/gemsmith/templates/gemfiles/rails-3.1.x.gemfile.tmp
91
+ - lib/gemsmith/templates/gemfiles/rails-3.2.x.gemfile.tmp
89
92
  - lib/gemsmith/templates/gitignore.tmp
90
93
  - lib/gemsmith/templates/lib/gem/action_controller/class_methods.rb.tmp
91
94
  - lib/gemsmith/templates/lib/gem/action_controller/instance_methods.rb.tmp
@@ -130,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
133
  version: '0'
131
134
  requirements: []
132
135
  rubyforge_project:
133
- rubygems_version: 1.8.13
136
+ rubygems_version: 1.8.15
134
137
  signing_key:
135
138
  specification_version: 3
136
139
  summary: Ruby gem skeleton generation for the professional gemsmith.