capi_book 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.
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.swp
3
+ *.rbc
4
+ .bundle
5
+ .config
6
+ .yardoc
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
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@capi_book"
10
+
11
+ # Uncomment the following lines if you want to verify rvm version per project
12
+ # rvmrc_rvm_version="1.18.6 (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,16 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rake'
4
+ gem 'yard', require: false
5
+ gem 'redcarpet', require: false
6
+
7
+
8
+ group :test do
9
+ gem 'rspec', '~>2.12.0'
10
+ gem 'cucumber'
11
+ gem 'simplecov'
12
+ gem 'simplecov-rcov'
13
+ gem 'aruba'
14
+ end
15
+
16
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,57 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ capi_book (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
+ multi_json (1.6.1)
27
+ rake (10.0.3)
28
+ redcarpet (2.2.2)
29
+ rspec (2.12.0)
30
+ rspec-core (~> 2.12.0)
31
+ rspec-expectations (~> 2.12.0)
32
+ rspec-mocks (~> 2.12.0)
33
+ rspec-core (2.12.2)
34
+ rspec-expectations (2.12.1)
35
+ diff-lcs (~> 1.1.3)
36
+ rspec-mocks (2.12.2)
37
+ simplecov (0.7.1)
38
+ multi_json (~> 1.0)
39
+ simplecov-html (~> 0.7.1)
40
+ simplecov-html (0.7.1)
41
+ simplecov-rcov (0.2.3)
42
+ simplecov (>= 0.4.1)
43
+ yard (0.8.4.1)
44
+
45
+ PLATFORMS
46
+ ruby
47
+
48
+ DEPENDENCIES
49
+ aruba
50
+ capi_book!
51
+ cucumber
52
+ rake
53
+ redcarpet
54
+ rspec (~> 2.12.0)
55
+ simplecov
56
+ simplecov-rcov
57
+ yard
data/MIT-LICENSE ADDED
@@ -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.
data/README.md ADDED
@@ -0,0 +1,17 @@
1
+ CapiBook
2
+ ========
3
+
4
+ Capistrano用レシピ集
5
+
6
+
7
+ ## Installation
8
+
9
+ TBD
10
+
11
+ ## Usage
12
+
13
+ TBD
14
+
15
+ ## Contributing
16
+
17
+ TBD
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ Dir.glob(File.expand_path('../lib/tasks/*.rake', __FILE__)).each { |f| load f }
4
+
5
+ task :default => [ :test, :yard ]
6
+ task :test => [ :features ]
7
+
data/capi_book.gemspec ADDED
@@ -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 'capi_book/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "capi_book"
8
+ gem.version = CapiBook::VERSION
9
+ gem.authors = ["Takahiro HAMAGUCHI"]
10
+ gem.email = ["tk_hamaguchi@xml-lab.jp"]
11
+ gem.description = %q{Recipe book for capistrano}
12
+ gem.summary = %q{Recipe book for capistrano.}
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,17 @@
1
+ # language: ja
2
+
3
+ 機能: Gemのビルド
4
+
5
+ シナリオ: gemコマンドを使ったビルド
6
+ 前提 プロジェクトルートにいる
7
+ かつ ディレクトリ"pkg"が削除されている
8
+ もし rakeタスク"build"を実行する
9
+ ならば 標準出力が下記の正規表現にマッチする:
10
+ """
11
+ capi_book \d.\d.\d(.\w+)? built to pkg/capi_book-\d.\d.\d(.\w+)?.gem
12
+ """
13
+ かつ 終了コードが"0"である
14
+ かつ ディレクトリ"pkg"が存在している
15
+ かつ 下記のファイルが存在している:
16
+ |pkg/capi_book-0.0.1.pre.gem|
17
+
@@ -0,0 +1,42 @@
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
33
+
34
+
35
+ ならば /^"(.*?)"が作成されている$/ do |path|
36
+ # File.exist?(path).should be_true
37
+ @cli = run("pwd")
38
+ p @cli.stdout(false)
39
+ # p @cli.stderr(false)
40
+ check_file_presence([path],true)
41
+ end
42
+
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+
3
+
4
+ require 'rake'
5
+ require 'aruba/cucumber'
6
+
7
+ Before do
8
+ @features_root = File.expand_path('../../../',__FILE__)
9
+ @dirs = [@features_root]
10
+ end
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+
4
+ module CapiBook
5
+
6
+ # @return [String] バージョン番号
7
+ VERSION = "0.0.1.pre"
8
+
9
+ end
data/lib/capi_book.rb ADDED
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require "capi_book/version"
4
+
5
+ # Capistrano用レシピ集モジュール
6
+ #
7
+ # @author tk_hamaguchi@xml-lab.jp
8
+ # @version 0.0.1pre
9
+ #
10
+ module CapiBook
11
+ end
@@ -0,0 +1,9 @@
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
8
+
9
+
@@ -0,0 +1,7 @@
1
+
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec) do |spec|
5
+ spec.pattern = 'spec/**/*_spec.rb'
6
+ spec.rspec_opts = ['-cfs']
7
+ end
@@ -0,0 +1,10 @@
1
+
2
+ require 'yard'
3
+ require 'yard/rake/yardoc_task'
4
+
5
+ YARD::Rake::YardocTask.new do |t|
6
+ t.files = ['app/controllers/**/*.rb','app/helpers/**/*.rb', 'app/mailers/**/*.rb', 'app/models/**/*.rb', 'lib/**/*.rb']
7
+ t.options = ['--no-private']
8
+ t.options << '--debug' << '--verbose' if $trace
9
+ end
10
+
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capi_book
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-18 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Recipe book for capistrano
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
+ - MIT-LICENSE
26
+ - README.md
27
+ - Rakefile
28
+ - capi_book.gemspec
29
+ - features/build.feature
30
+ - features/step_definitions/gem_steps.rb
31
+ - features/support/env.rb
32
+ - lib/capi_book.rb
33
+ - lib/capi_book/version.rb
34
+ - lib/tasks/cucumber.rake
35
+ - lib/tasks/rspec.rake
36
+ - lib/tasks/yard.rake
37
+ homepage: ''
38
+ licenses: []
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ segments:
50
+ - 0
51
+ hash: 353215945162019272
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>'
56
+ - !ruby/object:Gem::Version
57
+ version: 1.3.1
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 1.8.25
61
+ signing_key:
62
+ specification_version: 3
63
+ summary: Recipe book for capistrano.
64
+ test_files:
65
+ - features/build.feature
66
+ - features/step_definitions/gem_steps.rb
67
+ - features/support/env.rb
68
+ has_rdoc: