falkorlib 0.3.2 → 0.3.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 395609cb7eea10171f370b653926e3f45d1ec4fb
4
- data.tar.gz: 4c1be259201f3f86178f6538930d2c62cbc727bf
3
+ metadata.gz: 268cbfbe13bf123bf09deb6b4ecb48ea73bb7c47
4
+ data.tar.gz: fd2d6faf23d9a783012e40e85f61be0109939e79
5
5
  SHA512:
6
- metadata.gz: c373d7743ad2a45ec4a5f452d25ae24dc10476c12a879b3c8b8133287f1e4f22672c646aec4a40e77de138d588fcb102450b12d63c065ca434da55f14442e684
7
- data.tar.gz: 43e3a90e07c2dac1298a096be8c1ea27fc450d2fcd0b130e64b642660ced449348c50b54a67d8ea8f52f820b813baf27a31f7f322daa4c713fe34ecf62c8e599
6
+ metadata.gz: f8c3ef80d9c7704651ac8b20e11ed8ef3e62e0dd884ef57447947bf8ec577094c3668ad6b5492fd0736fdb83b4f123c64997ad14f0e3f3631ac815daecf84390
7
+ data.tar.gz: bddd9304358b05d2c26297bf1d067f440588c0f679c86d4c9d60695b769c663fb0f82d9eae8d0d00b919f6d538f1aa42b8b4d802f862563a3e4d81488f59255d
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.3.2)
4
+ falkorlib (0.3.3)
5
5
  awesome_print (~> 1.2)
6
6
  configatron (~> 3.2)
7
7
  git_remote_branch (~> 0)
8
8
  json (~> 1.8)
9
- license-generator
9
+ license-generator (~> 0)
10
10
  minigit (~> 0)
11
11
  rake (~> 10.1, >= 10.1.0)
12
12
  term-ansicolor (~> 1.3)
@@ -103,7 +103,7 @@ PLATFORMS
103
103
 
104
104
  DEPENDENCIES
105
105
  bundler (~> 1.0)
106
- codeclimate-test-reporter
106
+ codeclimate-test-reporter (~> 0)
107
107
  falkorlib!
108
108
  pry (~> 0.9)
109
109
  rspec (~> 2.7, >= 2.7.0)
@@ -131,7 +131,7 @@ Gem::Specification.new do |s|
131
131
  s.add_runtime_dependency("configatron", "~> 3.2")
132
132
  s.add_runtime_dependency("awesome_print", "~> 1.2")
133
133
  s.add_runtime_dependency("json", "~> 1.8")
134
- s.add_runtime_dependency("license-generator")
134
+ s.add_runtime_dependency("license-generator", '~> 0')
135
135
 
136
136
  #
137
137
  # One call to add_dependency('gem_name', 'gem version requirement') for each
@@ -149,7 +149,7 @@ Gem::Specification.new do |s|
149
149
  s.add_development_dependency("travis", "~> 1.6")
150
150
  s.add_development_dependency("travis-lint", "~> 1.8")
151
151
 
152
- s.add_development_dependency("codeclimate-test-reporter") #, group: :test, require: nil)
152
+ s.add_development_dependency("codeclimate-test-reporter", '~> 0') #, group: :test, require: nil)
153
153
  #s.add_development_dependency("bluecloth", "~> 2.2.0")
154
154
  #s.add_development_dependency("wlang", "~> 0.10.2")
155
155
 
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Thu 2014-08-28 23:02 svarrette>
3
+ # Time-stamp: <Sat 2014-08-30 14:24 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Puppet Module operations
6
6
  #
@@ -25,10 +25,10 @@ module FalkorLib #:nodoc:
25
25
  :mail => "#{ENV['GIT_AUTHOR_EMAIL']}",
26
26
  :summary => "rtfm",
27
27
  :description => '',
28
- :license => 'GPLv3',
28
+ :license => 'Apache-2.0',
29
29
  :source => '',
30
30
  :project_page => '',
31
- :issue_url => '',
31
+ :issues_url => '',
32
32
  :dependencies => [],
33
33
  :operatingsystem_support => [],
34
34
  :tags => []
@@ -69,7 +69,7 @@ module FalkorLib #:nodoc:
69
69
  error "Undefined type #{type}" if t.empty?
70
70
  result = []
71
71
  Dir["#{moduledir}/manifests/**/*.pp"].each do |ppfile|
72
- File.read(ppfile).scan(/^[ \t]*#{t}[\s]+([0-9a-zA-z:]+).*$/).each do |line|
72
+ File.read(ppfile).scan(/^[ \t]*#{t}[\s]+([0-9a-zA-z:-]+).*$/).each do |line|
73
73
  result << line[0]
74
74
  end
75
75
  end
@@ -97,7 +97,7 @@ module FalkorLib #:nodoc:
97
97
  config[:source].nil? ? v : config[:source]
98
98
  when :name
99
99
  File.basename(rootdir).gsub(/^puppet-/, '')
100
- when :issue_url
100
+ when :issues_url
101
101
  config[:project_page].nil? ? v : "#{config[:project_page]}/issues"
102
102
  when :description
103
103
  config[:summary].nil? ? v : "#{config[:summary]}"
@@ -111,9 +111,12 @@ module FalkorLib #:nodoc:
111
111
  name = config[:name].gsub(/.*-/, '')
112
112
  tags = ask("\tKeywords (comma-separated list of tags)", name)
113
113
  config[:tags] = tags.split(',')
114
- license = select_from(FalkorLib::Config::Puppet::Modules::DEFAULTS[:licenses],
114
+ list_license = FalkorLib::Config::Puppet::Modules::DEFAULTS[:licenses]
115
+ default_license = FalkorLib::Config::Puppet::Modules::DEFAULTS[:metadata][:license]
116
+ idx = list_license.index(default_license) unless default_license.nil?
117
+ license = select_from(list_license,
115
118
  'Select the license index for the Puppet module:',
116
- 1)
119
+ idx.nil? ? 1 : idx + 1)
117
120
  config[:license] = license.downcase unless license.empty?
118
121
  puts "\t" + sprintf("%-20s", "Module License:") + config[:license]
119
122
 
@@ -148,7 +151,7 @@ module FalkorLib #:nodoc:
148
151
  if FalkorLib::Git.init?(moduledir)
149
152
  if FalkorLib::GitFlow.init?(moduledir)
150
153
  info "=> preparing git-flow feature for the newly created module '#{config[:name]}'"
151
- FalkorLib::GitFlow.start('feature', "init_#{name}", moduledir)
154
+ FalkorLib::GitFlow.start('feature', "bootstraping", moduledir)
152
155
  end
153
156
  [ 'metadata.json', 'LICENSE', '.gitignore', 'Gemfile', 'Rakefile'].each do |f|
154
157
  FalkorLib::Git.add(File.join(moduledir, f))
@@ -183,20 +186,26 @@ module FalkorLib #:nodoc:
183
186
  end
184
187
  if ! deps.empty?
185
188
  deps.each do |l|
189
+ shortname = name.gsub(/.*-/, '')
190
+ shortmetaname = metadata["name"].gsub(/.*-/, '')
191
+ next if [name, metadata["name"], name.gsub(/.*-/, ''), metadata["name"].gsub(/.*-/, '') ].include? ( l )
186
192
  warn "The module '#{l}' is missing in the dependencies thus added"
187
- login = ask("[Github] login for the module '#{lib}'")
193
+ login = ask("[Github] login for the module '#{l}'")
188
194
  version = ask("Version requirement (ex: '>=1.0.0 <2.0.0' or '1.2.3' or '1.x')")
189
195
  metadata["dependencies"] << {
190
- "name" => "#{login}/#{lib}",
196
+ "name" => "#{login}/#{l}",
191
197
  "version_requirement" => "#{version}"
192
198
  }
193
199
  end
194
- warn "About to commit these changes in the '#{name}/metadata.json' file"
195
- really_continue?
196
- File.open(jsonfile,"w") do |f|
197
- f.write JSON.pretty_generate( metadata )
198
- end
199
200
  end
201
+ info "Metadata configuration for the module '#{name}'"
202
+ puts JSON.pretty_generate( metadata )
203
+ warn "About to commit these changes in the '#{name}/metadata.json' file"
204
+ really_continue?
205
+ File.open(jsonfile,"w") do |f|
206
+ f.write JSON.pretty_generate( metadata )
207
+ end
208
+
200
209
  end # parse
201
210
 
202
211
 
@@ -19,7 +19,7 @@ module FalkorLib #:nodoc:
19
19
  # MAJOR: Defines the major version
20
20
  # MINOR: Defines the minor version
21
21
  # PATCH: Defines the patch version
22
- MAJOR, MINOR, PATCH = 0, 3, 2
22
+ MAJOR, MINOR, PATCH = 0, 3, 3
23
23
 
24
24
  module_function
25
25
 
@@ -2,7 +2,7 @@
2
2
  #########################################
3
3
  # puppet_modules_spec.rb
4
4
  # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
- # Time-stamp: <Fri 2014-08-29 11:32 svarrette>
5
+ # Time-stamp: <Sat 2014-08-30 15:28 svarrette>
6
6
  #
7
7
  # @description Check the Puppet Modules operations
8
8
  #
@@ -36,8 +36,14 @@ describe FalkorLib::Puppet::Modules do
36
36
  moduledir = File.join(dir, name)
37
37
 
38
38
  it "#init -- create a puppet module" do
39
- Array.new(26).each { |e| STDIN.should_receive(:gets).and_return('') }
39
+ # Prepare answer to the questions
40
+ Array.new(11).each { |e| STDIN.should_receive(:gets).and_return('') }
41
+ STDIN.should_receive(:gets).and_return('Yes') ## initialize/update the directory
42
+ Array.new(14).each { |e| STDIN.should_receive(:gets).and_return('') }
43
+ STDIN.should_receive(:gets).and_return('') ## RVM version
44
+ STDIN.should_receive(:gets).and_return(name) ## RVM gemset
40
45
  STDIN.should_receive(:gets).and_return('No')
46
+
41
47
  FalkorLib::Puppet::Modules.init(moduledir)
42
48
  templatedir = File.join( FalkorLib.templates, 'puppet', 'modules')
43
49
  s = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falkorlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-29 00:00:00.000000000 Z
11
+ date: 2014-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -118,14 +118,14 @@ dependencies:
118
118
  name: license-generator
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ">="
121
+ - - "~>"
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ">="
128
+ - - "~>"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  - !ruby/object:Gem::Dependency
@@ -236,14 +236,14 @@ dependencies:
236
236
  name: codeclimate-test-reporter
237
237
  requirement: !ruby/object:Gem::Requirement
238
238
  requirements:
239
- - - ">="
239
+ - - "~>"
240
240
  - !ruby/object:Gem::Version
241
241
  version: '0'
242
242
  type: :development
243
243
  prerelease: false
244
244
  version_requirements: !ruby/object:Gem::Requirement
245
245
  requirements:
246
- - - ">="
246
+ - - "~>"
247
247
  - !ruby/object:Gem::Version
248
248
  version: '0'
249
249
  description: "This is my personal library I use to share the Ruby tidbits, Rake and