license-generator 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ # Version 0.1.1 (2011-10-03)
2
+
3
+ Fix for gem loading with ruby 1.8.7
4
+
5
+ # Version 0.1.0 (2011-10-03)
6
+
7
+ Find and load templates dynamically. Makes adding templates much easier.
8
+
1
9
  # Version 0.0.1 (2011-05-05)
2
10
 
3
11
  First version. Only supports BSD license.
@@ -12,3 +12,7 @@ Feature: Generate a License
12
12
  And the file "LICENSE" should contain "Neither the name of Hentzia nor the names of its"
13
13
 
14
14
  # TODO: add a couple more scenarios when we have more templates
15
+
16
+ Scenario: Bad template name
17
+ When I run `lickjen asdfaowefnasdfaoweranasdflao`
18
+ Then I should see a graceful failure message
@@ -1,3 +1,10 @@
1
+ # Bullshit fix for 1.8.7
2
+ begin
3
+ require 'rubygems'
4
+ rescue LoadError
5
+ # oh well!
6
+ end
7
+
1
8
  module LicenseGenerator
2
9
  autoload :App, "license-generator/app"
3
10
  end
@@ -11,8 +11,8 @@ module LicenseGenerator
11
11
 
12
12
  desc "list", "List available license templates"
13
13
  def list
14
- Dir.foreach(self.class.source_root) do |template|
15
- say template unless %w(. ..).include?(template)
14
+ for_each_template do |template|
15
+ say template
16
16
  end
17
17
  end
18
18
 
@@ -24,19 +24,26 @@ module LicenseGenerator
24
24
  def help(task = nil)
25
25
  super
26
26
  say "Templates:"
27
- Dir.foreach(self.class.source_root) do |template|
28
- unless %w(. ..).include?(template)
29
- template = template.split('.').first
30
- say " lickjen #{template}\t# Generate a #{template} template"
31
- end
27
+ for_each_template do |template|
28
+ say " lickjen #{template}\t# Generate a #{template} template"
32
29
  end
33
30
  end
34
31
 
35
32
  private
33
+
36
34
  def option(name)
37
35
  @template_options ||= {}
38
36
  @template_options[name] ||= ask("#{name.capitalize}:")
39
37
  @template_options[name]
40
38
  end
39
+
40
+ def for_each_template
41
+ Dir.foreach(self.class.source_root) do |template|
42
+ unless %w(. ..).include?(template)
43
+ template = template.split('.').first
44
+ yield(template)
45
+ end
46
+ end
47
+ end
41
48
  end
42
49
  end
@@ -1,5 +1,5 @@
1
1
  module License
2
2
  module Generator
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.authors = ["Justin Blake"]
10
10
  s.email = ["justin@hentzia.com"]
11
- s.homepage = ""
11
+ s.homepage = "https://github.com/blaix/license-generator"
12
12
  s.summary = %q{Open Source License generator}
13
13
  s.description = %q{Generate an open source license file in your project.}
14
14
 
metadata CHANGED
@@ -1,79 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: license-generator
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Justin Blake
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-10-03 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2011-10-03 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: thor
16
- requirement: &70227757839720 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
17
25
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
22
33
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70227757839720
25
- - !ruby/object:Gem::Dependency
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
26
36
  name: rake
27
- requirement: &70227757809080 !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
33
47
  type: :development
34
- prerelease: false
35
- version_requirements: *70227757809080
36
- - !ruby/object:Gem::Dependency
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
37
50
  name: rspec
38
- requirement: &70227757808360 !ruby/object:Gem::Requirement
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
39
53
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
44
61
  type: :development
45
- prerelease: false
46
- version_requirements: *70227757808360
47
- - !ruby/object:Gem::Dependency
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
48
64
  name: cucumber
49
- requirement: &70227757807700 !ruby/object:Gem::Requirement
65
+ prerelease: false
66
+ requirement: &id004 !ruby/object:Gem::Requirement
50
67
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ hash: 3
72
+ segments:
73
+ - 0
74
+ version: "0"
55
75
  type: :development
56
- prerelease: false
57
- version_requirements: *70227757807700
58
- - !ruby/object:Gem::Dependency
76
+ version_requirements: *id004
77
+ - !ruby/object:Gem::Dependency
59
78
  name: aruba
60
- requirement: &70227757807020 !ruby/object:Gem::Requirement
79
+ prerelease: false
80
+ requirement: &id005 !ruby/object:Gem::Requirement
61
81
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ hash: 3
86
+ segments:
87
+ - 0
88
+ version: "0"
66
89
  type: :development
67
- prerelease: false
68
- version_requirements: *70227757807020
90
+ version_requirements: *id005
69
91
  description: Generate an open source license file in your project.
70
- email:
92
+ email:
71
93
  - justin@hentzia.com
72
- executables:
94
+ executables:
73
95
  - lickjen
74
96
  extensions: []
97
+
75
98
  extra_rdoc_files: []
76
- files:
99
+
100
+ files:
77
101
  - .gitignore
78
102
  - CHANGELOG.md
79
103
  - Gemfile
@@ -95,31 +119,41 @@ files:
95
119
  - spec/app_spec.rb
96
120
  - spec/spec_helper.rb
97
121
  - templates/bsd.erb
98
- homepage: ''
122
+ has_rdoc: true
123
+ homepage: https://github.com/blaix/license-generator
99
124
  licenses: []
125
+
100
126
  post_install_message:
101
127
  rdoc_options: []
102
- require_paths:
128
+
129
+ require_paths:
103
130
  - lib
104
- required_ruby_version: !ruby/object:Gem::Requirement
131
+ required_ruby_version: !ruby/object:Gem::Requirement
105
132
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ hash: 3
137
+ segments:
138
+ - 0
139
+ version: "0"
140
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
141
  none: false
112
- requirements:
113
- - - ! '>='
114
- - !ruby/object:Gem::Version
115
- version: '0'
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ hash: 3
146
+ segments:
147
+ - 0
148
+ version: "0"
116
149
  requirements: []
150
+
117
151
  rubyforge_project: license-generator
118
- rubygems_version: 1.8.10
152
+ rubygems_version: 1.3.9.3
119
153
  signing_key:
120
154
  specification_version: 3
121
155
  summary: Open Source License generator
122
- test_files:
156
+ test_files:
123
157
  - features/generate_license.feature
124
158
  - features/get_help.feature
125
159
  - features/list_templates.feature