gem_plant 0.0.1.pre

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.
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.swp
3
+ *.rbc
4
+ .bundle
5
+ .config
6
+ .yardoc
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/yardoc
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ vendor/bundle
data/.rvmrc ADDED
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # This is an RVM Project .rvmrc file, used to automatically load the ruby
4
+ # development environment upon cd'ing into the directory
5
+
6
+ # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
7
+ # Only full ruby name is supported here, for short names use:
8
+ # echo "rvm use 1.9.3" > .rvmrc
9
+ environment_id="ruby-1.9.3-p385@gem_plant"
10
+
11
+ # Uncomment the following lines if you want to verify rvm version per project
12
+ # rvmrc_rvm_version="1.18.8 (master)" # 1.10.1 seams as a safe start
13
+ # eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
14
+ # echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
15
+ # return 1
16
+ # }
17
+
18
+ # First we attempt to load the desired environment directly from the environment
19
+ # file. This is very fast and efficient compared to running through the entire
20
+ # CLI and selector. If you want feedback on which environment was used then
21
+ # insert the word 'use' after --create as this triggers verbose mode.
22
+ if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
23
+ && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
24
+ then
25
+ \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
26
+ for __hook in "${rvm_path:-$HOME/.rvm}/hooks/after_use"*
27
+ do
28
+ if [[ -f "${__hook}" && -x "${__hook}" && -s "${__hook}" ]]
29
+ then \. "${__hook}" || true
30
+ fi
31
+ done
32
+ unset __hook
33
+ if [[ $- == *i* ]] # check for interactive shells
34
+ then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
35
+ else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
36
+ fi
37
+ else
38
+ # If the environment file has not yet been created, use the RVM CLI to select.
39
+ rvm --create use "$environment_id" || {
40
+ echo "Failed to create RVM environment '${environment_id}'."
41
+ return 1
42
+ }
43
+ fi
44
+
45
+ # If you use bundler, this might be useful to you:
46
+ # if [[ -s Gemfile ]] && {
47
+ # ! builtin command -v bundle >/dev/null ||
48
+ # builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
49
+ # }
50
+ # then
51
+ # printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
52
+ # gem install bundler
53
+ # fi
54
+ # if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
55
+ # then
56
+ # bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
57
+ # fi
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ gem 'rake'
6
+ gem 'yard', require: false
7
+ gem 'redcarpet', require: false
8
+
9
+ group :test do
10
+ gem 'rspec', '~>2.12.0'
11
+ gem 'cucumber'
12
+ gem 'aruba'
13
+ end
@@ -0,0 +1,48 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ gem_plant (0.0.1.pre)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ aruba (0.5.1)
10
+ childprocess (~> 0.3.6)
11
+ cucumber (>= 1.1.1)
12
+ rspec-expectations (>= 2.7.0)
13
+ builder (3.1.4)
14
+ childprocess (0.3.8)
15
+ ffi (~> 1.0, >= 1.0.11)
16
+ cucumber (1.2.1)
17
+ builder (>= 2.1.2)
18
+ diff-lcs (>= 1.1.3)
19
+ gherkin (~> 2.11.0)
20
+ json (>= 1.4.6)
21
+ diff-lcs (1.1.3)
22
+ ffi (1.4.0)
23
+ gherkin (2.11.6)
24
+ json (>= 1.7.6)
25
+ json (1.7.7)
26
+ rake (10.0.3)
27
+ redcarpet (2.2.2)
28
+ rspec (2.12.0)
29
+ rspec-core (~> 2.12.0)
30
+ rspec-expectations (~> 2.12.0)
31
+ rspec-mocks (~> 2.12.0)
32
+ rspec-core (2.12.2)
33
+ rspec-expectations (2.12.1)
34
+ diff-lcs (~> 1.1.3)
35
+ rspec-mocks (2.12.2)
36
+ yard (0.8.4.1)
37
+
38
+ PLATFORMS
39
+ ruby
40
+
41
+ DEPENDENCIES
42
+ aruba
43
+ cucumber
44
+ gem_plant!
45
+ rake
46
+ redcarpet
47
+ rspec (~> 2.12.0)
48
+ yard
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Takahiro HAMAGUCHI
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,17 @@
1
+ GemPlant
2
+ ========
3
+
4
+ Gemテンプレートジェネレータです。
5
+
6
+
7
+ ## Installation
8
+
9
+ TBD
10
+
11
+ ## Usage
12
+
13
+ TBD
14
+
15
+ ## Contributing
16
+
17
+ TBD
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ Dir.glob(File.expand_path('../lib/tasks/*.rake', __FILE__)).each { |f| load f }
4
+
5
+ task :default => [ :features, :yard ]
@@ -0,0 +1,16 @@
1
+ # language: ja
2
+
3
+ 機能: Gemのビルド
4
+
5
+ シナリオ: gemコマンドを使ったビルド
6
+ 前提 プロジェクトルートにいる
7
+ かつ ディレクトリ"pkg"が削除されている
8
+ もし rakeタスク"build"を実行する
9
+ ならば 標準出力が下記の正規表現にマッチする:
10
+ """
11
+ gem_plant \d.\d.\d(.\w+)? built to pkg/gem_plant-\d.\d.\d(.\w+)?.gem
12
+ """
13
+ かつ 終了コードが"0"である
14
+ かつ ディレクトリ"pkg"が存在している
15
+ かつ 下記のファイルが存在している:
16
+ |pkg/gem_plant-0.0.1.pre.gem|
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+
3
+
4
+ 前提 /^プロジェクトルートにいる$/ do
5
+ `pwd`.strip.should == @features_root
6
+ end
7
+
8
+ 前提 /^ディレクトリ"(.*?)"が削除されている$/ do |path|
9
+ FileUtils.rm_rf path
10
+ check_directory_presence([path], false)
11
+ end
12
+
13
+ もし /^rakeタスク"(.*?)"を実行する$/ do |task_name|
14
+ run_simple "rake #{task_name}"
15
+ end
16
+
17
+
18
+ ならば /^終了コードが"(.*?)"である$/ do |exit_status|
19
+ assert_exit_status(exit_status.to_i)
20
+ end
21
+
22
+ ならば /^標準出力が下記の正規表現にマッチする:$/ do |expected|
23
+ assert_matching_output(expected, all_stdout)
24
+ end
25
+
26
+ ならば /^ディレクトリ"(.*?)"が存在して(いる|いない)$/ do |directory,presence|
27
+ check_directory_presence([directory], (presence == "いる"))
28
+ end
29
+
30
+ ならば /^下記のファイルが存在している:$/ do |files|
31
+ check_file_presence(files.raw.map{|file_row| file_row[0]}, true)
32
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+
4
+ require 'rake'
5
+ require 'aruba/cucumber'
6
+
7
+
8
+ Before do
9
+ @features_root = File.expand_path('../../../', __FILE__)
10
+ @dirs = [@features_root]
11
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'gem_plant/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "gem_plant"
8
+ gem.version = GemPlant::VERSION
9
+ gem.authors = ["Takahiro HAMAGUCHI"]
10
+ gem.email = ["tk_hamaguchi@xml-lab.jp"]
11
+ gem.description = %q{Gem template generator}
12
+ gem.summary = %q{Gem template generator.}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+ end
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+
3
+
4
+ require "gem_plant/version"
5
+
6
+
7
+ # Gemテンプレートジェネレータ
8
+ #
9
+ # @author tk_hamaguchi@xml-lab.jp
10
+ # @version 0.0.1pre
11
+ #
12
+ module GemPlant
13
+ end
@@ -0,0 +1,6 @@
1
+ # encoding: utf-8
2
+
3
+ module GemPlant
4
+ # @return [String] バージョン番号
5
+ VERSION = "0.0.1.pre"
6
+ end
@@ -0,0 +1,7 @@
1
+ require 'cucumber'
2
+ require 'cucumber/rake/task'
3
+
4
+
5
+ Cucumber::Rake::Task.new(:features) do |t|
6
+ t.cucumber_opts = "features --format pretty"
7
+ end
@@ -0,0 +1,8 @@
1
+ require 'yard'
2
+ require 'yard/rake/yardoc_task'
3
+
4
+ YARD::Rake::YardocTask.new do |t|
5
+ t.files = ['app/controllers/**/*.rb','app/helpers/**/*.rb', 'app/mailers/**/*.rb', 'app/models/**/*.rb', 'lib/**/*.rb']
6
+ t.options = ['--no-private', '--output-dir', 'doc/yardoc']
7
+ t.options << '--debug' << '--verbose' if $trace
8
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gem_plant
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1.pre
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Takahiro HAMAGUCHI
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-20 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Gem template generator
15
+ email:
16
+ - tk_hamaguchi@xml-lab.jp
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - .rvmrc
23
+ - Gemfile
24
+ - Gemfile.lock
25
+ - LICENSE.txt
26
+ - README.md
27
+ - Rakefile
28
+ - features/build.feature
29
+ - features/step_definitions/gem_steps.rb
30
+ - features/support/env.rb
31
+ - gem_plant.gemspec
32
+ - lib/gem_plant.rb
33
+ - lib/gem_plant/version.rb
34
+ - lib/tasks/cucumber.rake
35
+ - lib/tasks/yard.rake
36
+ homepage: ''
37
+ licenses: []
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ segments:
49
+ - 0
50
+ hash: 581955757297410521
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>'
55
+ - !ruby/object:Gem::Version
56
+ version: 1.3.1
57
+ requirements: []
58
+ rubyforge_project:
59
+ rubygems_version: 1.8.25
60
+ signing_key:
61
+ specification_version: 3
62
+ summary: Gem template generator.
63
+ test_files:
64
+ - features/build.feature
65
+ - features/step_definitions/gem_steps.rb
66
+ - features/support/env.rb
67
+ has_rdoc: