fedux_org-stdlib 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,14 @@
1
- begin
2
- require 'yard'
3
- rescue LoadError
4
- $stderr.puts 'You need to install the "yard"-gem to make that rake task work.'
5
- exit 1
6
- end
1
+ unless ENV.to_hash.has_key? 'CI'
2
+
3
+ begin
4
+ require 'yard'
5
+ rescue LoadError
6
+ $stderr.puts 'You need to install the "yard"-gem to make that rake task work.'
7
+ exit 1
8
+ end
9
+
10
+ YARD::Rake::YardocTask.new() do |y|
11
+ # y.options << '--verbose'
12
+ end
7
13
 
8
- YARD::Rake::YardocTask.new() do |y|
9
- # y.options << '--verbose'
10
14
  end
@@ -1,8 +1,12 @@
1
- namespace :gem do
2
- begin
3
- require 'bundler/gem_tasks'
4
- rescue LoadError
5
- $stderr.puts 'You need to install the "bundler"-gem to make that rake task work.'
6
- exit 1
1
+ unless ENV.to_hash.has_key? 'CI'
2
+
3
+ namespace :gem do
4
+ begin
5
+ require 'bundler/gem_tasks'
6
+ rescue LoadError
7
+ $stderr.puts 'You need to install the "bundler"-gem to make that rake task work.'
8
+ exit 1
9
+ end
7
10
  end
11
+
8
12
  end
@@ -1,3 +1,7 @@
1
- namespace :gem do
2
- require 'rubygems/package_task'
1
+ unless ENV.to_hash.has_key? 'CI'
2
+
3
+ namespace :gem do
4
+ require 'rubygems/package_task'
5
+ end
6
+
3
7
  end
@@ -1,7 +1,7 @@
1
1
  namespace :test do
2
2
  desc 'Run tests in "travis mode"'
3
3
  task :travis_specs do
4
- ENV['TRAVIS_CI'] = 'true'
4
+ ENV['CI'] = 'true'
5
5
  sh 'rspec spec'
6
6
  sh 'cucumber -p all'
7
7
  end
@@ -1,7 +1,10 @@
1
- namespace :travis do
2
- desc 'Runs travis-lint to check .travis.yml'
3
- task :lint do
4
- sh 'travis-lint'
1
+ unless ENV.to_hash.has_key? 'CI'
2
+
3
+ namespace :travis do
4
+ desc 'Runs travis-lint to check .travis.yml'
5
+ task :lint do
6
+ sh 'travis-lint'
7
+ end
5
8
  end
6
- end
7
9
 
10
+ end
@@ -1,31 +1,33 @@
1
- require_relative 'base'
1
+ unless ENV.to_hash.has_key? 'CI'
2
2
 
3
- begin
4
- require 'active_support/core_ext/string/strip'
5
- rescue LoadError
6
- $stderr.puts 'You need to install the "activesupport"-gem to make that rake task work.'
7
- exit 1
8
- end
3
+ require_relative 'base'
9
4
 
10
- begin
11
- require 'erubis'
12
- rescue LoadError
13
- $stderr.puts 'You need to install the "erubis"-gem to make that rake task work.'
14
- exit 1
15
- end
5
+ begin
6
+ require 'active_support/core_ext/string/strip'
7
+ rescue LoadError
8
+ $stderr.puts 'You need to install the "activesupport"-gem to make that rake task work.'
9
+ exit 1
10
+ end
16
11
 
17
- namespace :version do
18
- desc 'bump version of library to new version'
19
- task :bump do
12
+ begin
13
+ require 'erubis'
14
+ rescue LoadError
15
+ $stderr.puts 'You need to install the "erubis"-gem to make that rake task work.'
16
+ exit 1
17
+ end
20
18
 
21
- new_version = ENV['VERSION'] || ENV['version']
19
+ namespace :version do
20
+ desc 'bump version of library to new version'
21
+ task :bump do
22
22
 
23
- raise Exception, "You need to define a version via \"VERSION=<version>\" or \"version=<version>\"." unless new_version
23
+ new_version = ENV['VERSION'] || ENV['version']
24
24
 
25
- raw_module_names = File.open(version_file, "r").readlines.grep(/module/)
26
- module_names = raw_module_names.collect { |n| n.chomp.match(/module\s+(\S+)/) {$1} }
25
+ raise Exception, "You need to define a version via \"VERSION=<version>\" or \"version=<version>\"." unless new_version
27
26
 
28
- template = <<-EOF
27
+ raw_module_names = File.open(version_file, "r").readlines.grep(/module/)
28
+ module_names = raw_module_names.collect { |n| n.chomp.match(/module\s+(\S+)/) {$1} }
29
+
30
+ template = <<-EOF
29
31
  #main <%= @modules.first %>
30
32
  <% @modules.each do |m| %>
31
33
  module <%= m %>
@@ -34,15 +36,16 @@ namespace :version do
34
36
  <% @modules.size.times do |m| %>
35
37
  end
36
38
  <% end %>
37
- EOF
39
+ EOF
38
40
 
39
- version_string = Erubis::Eruby.new(template).evaluate(modules: module_names, version: new_version)
41
+ version_string = Erubis::Eruby.new(template).evaluate(modules: module_names, version: new_version)
40
42
 
41
- File.open(version_file, "w") do |f|
42
- f.write version_string.strip_heredoc
43
- end
43
+ File.open(version_file, "w") do |f|
44
+ f.write version_string.strip_heredoc
45
+ end
44
46
 
45
- sh "git add #{version_file}"
46
- sh "git commit -m 'version bump to #{new_version}'"
47
+ sh "git add #{version_file}"
48
+ sh "git commit -m 'version bump to #{new_version}'"
49
+ end
47
50
  end
48
51
  end
@@ -1,6 +1,6 @@
1
1
  #main FeduxOrg
2
2
  module FeduxOrg
3
3
  module Stdlib
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fedux_org-stdlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: