gemstone 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,7 @@
1
1
  # Gemstone: Changelog
2
2
 
3
+ ## v0.2
4
+ Fix: gem executable inclusion
5
+
3
6
  ## v0.1
4
7
  First version
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require './lib/gemstone'
3
+
4
+ GemStone::Generator.new
@@ -3,7 +3,7 @@ require 'fileutils'
3
3
 
4
4
  module GemStone
5
5
 
6
- VERSION = '0.1'
6
+ VERSION = '0.2'
7
7
 
8
8
  class MissingOption < Exception; end
9
9
 
@@ -14,10 +14,6 @@ class OptionsTest < GemStoneTest
14
14
  }
15
15
  end
16
16
 
17
- def test_version
18
- assert_equal '0.1', GemStone::VERSION
19
- end
20
-
21
17
  def test_required_options_are_checked
22
18
  GemStone::OptionsValidator::REQUIRED_OPTIONS.each do |option|
23
19
  @valid_options.delete(option)
@@ -90,6 +90,16 @@ class ResultsTest < GemStoneTest
90
90
  assert_file_includes 'my_gem.gemspec', 's.description = "A short description goes here"'
91
91
  end
92
92
 
93
+ def test_gemspec_includes_executable_file_if_selected
94
+ assert_file_includes 'my_gem.gemspec', 's.executables = ["my_gem"]'
95
+ end
96
+
97
+ def test_gemspec_doesnt_include_executable_file_if_not_selected
98
+ @valid_options[:executable] = false
99
+ GemStone::Generator.new @valid_options
100
+ assert_file_doesnt_include 'my_gem.gemspec', 's.executables = ["my_gem"]'
101
+ end
102
+
93
103
 
94
104
  ## README.md
95
105
 
@@ -224,6 +234,11 @@ class ResultsTest < GemStoneTest
224
234
  path = sandboxed_path file_path
225
235
  assert File.file?(path) && File.read(path).include?(content), "String '#{content}' not found in #{path}"
226
236
  end
237
+
238
+ def assert_file_doesnt_include(file_path, content)
239
+ path = sandboxed_path file_path
240
+ assert File.file?(path) && !File.read(path).include?(content), "String '#{content}' found in #{path}"
241
+ end
227
242
 
228
243
  def assert_file_created(file_path)
229
244
  path = sandboxed_path file_path
@@ -10,7 +10,9 @@ Gem::Specification.new do |s|
10
10
  s.summary = "Lorem ipsum and so on"
11
11
  s.description = "A short description goes here"
12
12
 
13
- # s.executables = ["newgem"]
13
+
14
+ s.executables = ["my_gem"]
15
+
14
16
  s.files = Dir["{lib,test}/**/*", "[A-Z]*", "init.rb"] - ["Gemfile.lock"]
15
17
  s.require_path = 'lib'
16
18
 
metadata CHANGED
@@ -4,8 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
- version: "0.1"
7
+ - 2
8
+ version: "0.2"
9
9
  platform: ruby
10
10
  authors:
11
11
  - Raul Murciano
@@ -33,8 +33,8 @@ dependencies:
33
33
  description: A new gem generator. Nothing more, nothing less.
34
34
  email:
35
35
  - raul@murciano.net
36
- executables: []
37
-
36
+ executables:
37
+ - gemstone
38
38
  extensions: []
39
39
 
40
40
  extra_rdoc_files: []
@@ -59,6 +59,7 @@ files:
59
59
  - LICENSE
60
60
  - Rakefile
61
61
  - README.md
62
+ - bin/gemstone
62
63
  has_rdoc: true
63
64
  homepage: http://github.com/raul/gemstone
64
65
  licenses: []