pointrb 0.0.1

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/API-GUIDE.md ADDED
@@ -0,0 +1,8 @@
1
+ # API Guide
2
+
3
+ This very brief documentation should give you a good starting point on how to
4
+ discover the API:
5
+
6
+ ```
7
+
8
+ ```
data/CONTRIBUTIONS.md ADDED
@@ -0,0 +1,7 @@
1
+ # Contributing
2
+
3
+ 1. Fork it
4
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
5
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
6
+ 4. Push to the branch (`git push origin my-new-feature`)
7
+ 5. Create new Pull Request
data/Gemfile ADDED
@@ -0,0 +1,30 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :test do
6
+ gem 'rake'
7
+ gem 'rspec'
8
+ gem 'simplecov'
9
+ gem 'aruba'
10
+ gem 'fuubar'
11
+ gem 'ffaker'
12
+ end
13
+
14
+ group :documentation do
15
+ gem 'yard'
16
+ gem 'redcarpet'
17
+ gem 'github-markup'
18
+ end
19
+
20
+ group :development do
21
+ gem 'tmrb'
22
+ gem 'debugger'
23
+ gem 'pry'
24
+ gem 'pry-doc'
25
+ gem 'awesome_print'
26
+ gem 'travis-lint'
27
+ gem 'activesupport'
28
+ gem 'fuubar'
29
+ gem 'churn'
30
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,124 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pointrb (0.0.1)
5
+ active_support
6
+ middleware
7
+
8
+ GEM
9
+ remote: http://rubygems.org/
10
+ specs:
11
+ active_support (3.0.0)
12
+ activesupport (= 3.0.0)
13
+ activesupport (3.0.0)
14
+ arrayfields (4.7.4)
15
+ aruba (0.5.1)
16
+ childprocess (~> 0.3.6)
17
+ cucumber (>= 1.1.1)
18
+ rspec-expectations (>= 2.7.0)
19
+ awesome_print (1.1.0)
20
+ builder (3.1.4)
21
+ childprocess (0.3.8)
22
+ ffi (~> 1.0, >= 1.0.11)
23
+ chronic (0.9.0)
24
+ churn (0.0.28)
25
+ chronic (>= 0.2.3)
26
+ hirb
27
+ json_pure
28
+ main
29
+ ruby_parser (~> 3.0)
30
+ sexp_processor (~> 4.1)
31
+ coderay (1.0.9)
32
+ columnize (0.3.6)
33
+ cucumber (1.2.1)
34
+ builder (>= 2.1.2)
35
+ diff-lcs (>= 1.1.3)
36
+ gherkin (~> 2.11.0)
37
+ json (>= 1.4.6)
38
+ debugger (1.3.1)
39
+ columnize (>= 0.3.1)
40
+ debugger-linecache (~> 1.1.1)
41
+ debugger-ruby_core_source (~> 1.1.8)
42
+ debugger-linecache (1.1.2)
43
+ debugger-ruby_core_source (>= 1.1.1)
44
+ debugger-ruby_core_source (1.1.8)
45
+ diff-lcs (1.1.3)
46
+ fattr (2.2.1)
47
+ ffaker (1.15.0)
48
+ ffi (1.4.0)
49
+ fuubar (1.1.0)
50
+ rspec (~> 2.0)
51
+ rspec-instafail (~> 0.2.0)
52
+ ruby-progressbar (~> 1.0.0)
53
+ gherkin (2.11.6)
54
+ json (>= 1.7.6)
55
+ github-markup (0.7.5)
56
+ hashr (0.0.22)
57
+ hirb (0.7.1)
58
+ json (1.7.7)
59
+ json_pure (1.7.7)
60
+ main (5.1.1)
61
+ arrayfields (>= 4.7.4)
62
+ chronic (>= 0.6.2)
63
+ fattr (>= 2.2.0)
64
+ map (>= 5.1.0)
65
+ map (6.3.0)
66
+ method_source (0.8.1)
67
+ middleware (0.1.0)
68
+ multi_json (1.6.1)
69
+ pry (0.9.12)
70
+ coderay (~> 1.0.5)
71
+ method_source (~> 0.8)
72
+ slop (~> 3.4)
73
+ pry-doc (0.4.4)
74
+ pry (>= 0.9.9.6)
75
+ yard (~> 0.8.1)
76
+ rake (10.0.3)
77
+ redcarpet (2.2.2)
78
+ rspec (2.12.0)
79
+ rspec-core (~> 2.12.0)
80
+ rspec-expectations (~> 2.12.0)
81
+ rspec-mocks (~> 2.12.0)
82
+ rspec-core (2.12.2)
83
+ rspec-expectations (2.12.1)
84
+ diff-lcs (~> 1.1.3)
85
+ rspec-instafail (0.2.4)
86
+ rspec-mocks (2.12.2)
87
+ ruby-progressbar (1.0.2)
88
+ ruby_parser (3.1.1)
89
+ sexp_processor (~> 4.1)
90
+ sexp_processor (4.1.5)
91
+ simplecov (0.7.1)
92
+ multi_json (~> 1.0)
93
+ simplecov-html (~> 0.7.1)
94
+ simplecov-html (0.7.1)
95
+ slop (3.4.3)
96
+ thor (0.17.0)
97
+ tmrb (1.2.7)
98
+ thor
99
+ travis-lint (1.6.0)
100
+ hashr (~> 0.0.22)
101
+ yard (0.8.4.1)
102
+
103
+ PLATFORMS
104
+ ruby
105
+
106
+ DEPENDENCIES
107
+ activesupport
108
+ aruba
109
+ awesome_print
110
+ churn
111
+ debugger
112
+ ffaker
113
+ fuubar
114
+ github-markup
115
+ pointrb!
116
+ pry
117
+ pry-doc
118
+ rake
119
+ redcarpet
120
+ rspec
121
+ simplecov
122
+ tmrb
123
+ travis-lint
124
+ yard
data/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (C) 2013 Max Meyer
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
20
+
data/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # PointRb
2
+
3
+ [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/maxmeyer/prointrb)
4
+ [![Build Status](https://travis-ci.org/maxmeyer/pointrb.png?branch=master)](https://travis-ci.org/maxmeyer/pointrb)
5
+
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ gem 'pointrb'
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install pointrb
20
+
21
+ ## Usage
22
+
23
+ Currently the following strategies are supported
24
+ <table>
25
+ <tr>
26
+ <th>Strategy</th>
27
+ <th>Description</th>
28
+ </tr>
29
+ <tr>
30
+ <td>:contains_all</td>
31
+ <td>True if all of the given keywords are part of the data</td>
32
+ </tr>
33
+ <tr>
34
+ <td>:contains_any</td>
35
+ <td>True if any of the given keywords are part of the data</td>
36
+ </tr>
37
+ <tr>
38
+ <td>:not_contains</td>
39
+ <td>True if the given keywords are not part of the data</td>
40
+ </tr>
41
+ <tr>
42
+ <td>:contains_all_as_substring</td>
43
+ <td>True if all given keywords are a substring of an data element</td>
44
+ </tr>
45
+ <tr>
46
+ <td>:contains_any_as_substring</td>
47
+ <td>True if any given keyword are a substring of an data element</td>
48
+ </tr>
49
+ <tr>
50
+ <td>:not_contains_substring</td>
51
+ <td>True if none of the given keywords is a substring of an data element</td>
52
+ </tr>
53
+ <tr>
54
+ <td>:is_equal</td>
55
+ <td>True if both, the keywords and the data, are identical</td>
56
+ </tr>
57
+ <tr>
58
+ <td>:is_not_equal</td>
59
+ <td>True if the keywords are didfferent from the data</td>
60
+ </tr>
61
+ </table>
62
+
63
+ ### Simple example
64
+
65
+ ```ruby
66
+ require 'the_array_comparator'
67
+ comparator = TheArrayComparator::Comparator.new
68
+ data = %w{ a b c d }
69
+ keyword_overlap = %w{ a b }
70
+
71
+ comparator.add_check data , :contains_all , keyword_overlap
72
+
73
+ result = comparator.success?
74
+ puts result #should be true
75
+ ```
76
+
77
+ ### Example with substrings
78
+
79
+ ```ruby
80
+ require 'the_array_comparator'
81
+ comparator = TheArrayComparator::Comparator.new
82
+ data = %w{ acd b }
83
+ keyword_overlap = %w{ cd b }
84
+
85
+ comparator.add_check data , :contains_all_as_substring, keyword_overlap
86
+
87
+ result = comparator.success?
88
+ puts result #should be true
89
+ ```
90
+
91
+ ### Example with exceptions
92
+
93
+ ```ruby
94
+ require 'the_array_comparator'
95
+ comparator = TheArrayComparator::Comparator.new
96
+ data = %w{ acd b }
97
+ keyword_overlap = %w{ a b }
98
+ exceptions = %w{ cd }
99
+
100
+ comparator.add_check data , :contains_all_as_substring, keyword_overlap, exceptions
101
+
102
+ result = comparator.success?
103
+ puts result #should be false
104
+ ```
105
+
106
+ ### Extend the library
107
+
108
+ If you wish to write your own comparators you can do so. Just register those classes with a keyword.
109
+
110
+ ```ruby
111
+ TheArrayComparator::Comparator.register :my_contains, Strategies::MyContains
112
+ ```
113
+
114
+ ## Further reading
115
+
116
+ Please the the full api-documentation on [rdoc info](http://rdoc.info/github/maxmeyer/the_array_comparator/frames) for further reading.
117
+ I just give you a brief overview of all the available methods. There's also a brief [guide](API-GUIDE.md) about howto discover the API.
118
+
119
+ ## Contributing
120
+
121
+ Please see [CONTRIBUTIONS.md](CONTRIBUTIONS.md).
122
+
123
+ ## Copyright
124
+
125
+ (c) 2013 Max Meyer. All rights reserved. Please also see [LICENSE.md](LICENSE.md).
data/RELEASE_NOTES.md ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env rake
2
+
3
+ unless ENV['TRAVIS_CI'] == 'true'
4
+ namespace :gem do
5
+ require 'bundler/gem_tasks'
6
+ end
7
+
8
+ require 'yard'
9
+ require 'rubygems/package_task'
10
+ require 'active_support/core_ext/string/strip'
11
+ end
12
+
13
+ YARD::Rake::YardocTask.new() do |y|
14
+ # y.options << '--verbose'
15
+ end
16
+
17
+ desc 'start tmux'
18
+ task :terminal do
19
+ sh "script/terminal"
20
+ end
21
+
22
+ task :term => :terminal
23
+ task :t => :terminal
24
+
25
+ namespace :version do
26
+ version_file = Dir.glob('lib/**/version.rb').first
27
+
28
+ desc 'bump version of library to new version'
29
+ task :bump do
30
+
31
+ new_version = ENV['VERSION'] || ENV['version']
32
+
33
+ raw_module_name = File.open(version_file, "r").readlines.grep(/module/).first
34
+ module_name = raw_module_name.chomp.match(/module\s+(\S+)/) {$1}
35
+
36
+ version_string = %Q{#main #{module_name}
37
+ module #{module_name}
38
+ VERSION = '#{new_version}'
39
+ end}
40
+
41
+ File.open(version_file, "w") do |f|
42
+ f.write version_string.strip_heredoc
43
+ end
44
+
45
+ sh "git add #{version_file}"
46
+ sh "git commit -m 'version bump to #{new_version}'"
47
+ project = 'the_array_comparator'
48
+ sh "git tag #{project}-v#{new_version}"
49
+ end
50
+
51
+ desc 'show version of library'
52
+ task :show do
53
+ raw_version = File.open(version_file, "r").readlines.grep(/VERSION/).first
54
+
55
+ if raw_version
56
+ version = raw_version.chomp.match(/VERSION\s+=\s+["']([^'"]+)["']/) { $1 }
57
+ puts version
58
+ else
59
+ warn "Could not parse version file \"#{version_file}\""
60
+ end
61
+
62
+ end
63
+
64
+ desc 'Restore version file from git repository'
65
+ task :restore do
66
+ sh "git checkout #{version_file}"
67
+ end
68
+
69
+ end
70
+
71
+ namespace :travis do
72
+ desc 'Runs travis-lint to check .travis.yml'
73
+ task :check do
74
+ sh 'travis-lint'
75
+ end
76
+ end
77
+
78
+ namespace :test do
79
+ desc 'Run specs'
80
+ task :specs do
81
+ sh 'bundle exec rspec spec'
82
+ end
83
+
84
+ desc 'Run tests in "travis mode"'
85
+ task :travis_specs do
86
+ ENV['TRAVIS_CI'] = 'true'
87
+ sh 'rspec spec'
88
+ end
89
+ end
90
+
91
+ task :console do
92
+ sh 'script/console'
93
+ end
data/TODO.md ADDED
@@ -0,0 +1,2 @@
1
+ * Cache -> only check if there are __no__ new objects
2
+
@@ -0,0 +1,30 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :test do
6
+ gem 'rake'
7
+ gem 'rspec'
8
+ gem 'simplecov'
9
+ gem 'aruba'
10
+ gem 'fuubar'
11
+ gem 'ffaker'
12
+ end
13
+
14
+ group :documentation do
15
+ gem 'yard'
16
+ gem 'redcarpet'
17
+ gem 'github-markup'
18
+ end
19
+
20
+ group :development do
21
+ gem 'tmrb'
22
+ gem 'debugger'
23
+ gem 'pry'
24
+ gem 'pry-doc'
25
+ gem 'awesome_print'
26
+ gem 'travis-lint'
27
+ gem 'activesupport'
28
+ gem 'fuubar'
29
+ gem 'churn'
30
+ end
@@ -0,0 +1,15 @@
1
+ source :rubygems
2
+
3
+ gemspec path: '../'
4
+
5
+ group :test do
6
+ gem 'rake'
7
+ gem 'rspec'
8
+ gem 'fuubar'
9
+ end
10
+
11
+ group :documentation do
12
+ gem 'yard'
13
+ gem 'redcarpet'
14
+ gem 'github-markup'
15
+ end
@@ -0,0 +1,4 @@
1
+ # Project initializer
2
+ module PointRb
3
+ VERSION = '0.0.1'
4
+ end
data/pointrb.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'pointrb/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "pointrb"
8
+ gem.version = PointRb::VERSION
9
+ gem.authors = ["Max Meyer"]
10
+ gem.email = ["dev@fedux.org"]
11
+ gem.description = %q{Initialize project diretory base on templates}
12
+ gem.summary = <<-EOF
13
+ PointRb is a project initializer which helps you to create a directory structure
14
+ for your project. It supports profiles so that you can use different layouts for
15
+ different projects: library, webapplication etc.
16
+ EOF
17
+ gem.homepage = "https://www.github.com/max_meyer/pointrb"
18
+
19
+ gem.files = `git ls-files`.split($/)
20
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
21
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
22
+ gem.require_paths = ["lib"]
23
+
24
+ gem.add_runtime_dependency 'active_support'
25
+ gem.add_runtime_dependency 'middleware'
26
+ end
data/script/console ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $LOAD_PATH << File.expand_path('../lib', File.dirname(__FILE__))
4
+
5
+ require 'pointrb'
6
+ require 'pry'
7
+
8
+ Pry.start
data/script/terminal ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tmrb'
4
+
5
+ tmux = TmRb::Multiplexer.new
6
+ #creates an empty window
7
+ tmux.new_session(session_name: 'pointrb')
8
+
9
+ tmux.new_window(:name => 'code', :command => "zsh -c 'vim -p lib/**/*.rb'")
10
+ tmux.new_window(:name => 'spec', :command => "zsh -c 'vim -p spec/**/*.rb'")
11
+ tmux.new_window(:name => 'features', :command => "zsh -c 'vim -p features/**/*.{rb,feature}'")
12
+ tmux.start
@@ -0,0 +1,38 @@
1
+ #encoding: utf-8
2
+
3
+ $LOAD_PATH << File.expand_path('../lib' , File.dirname(__FILE__))
4
+
5
+ unless ENV['TRAVIS_CI'] == 'true'
6
+ require 'pry'
7
+ require 'debugger'
8
+ require 'ap'
9
+ require 'ffaker'
10
+ require 'benchmark'
11
+ end
12
+
13
+ require 'stringio'
14
+ require 'tempfile'
15
+
16
+ require 'active_support/core_ext/object/blank'
17
+ require 'active_support/core_ext/numeric/time'
18
+ #require 'active_support/core_ext/kernel/reporting'
19
+
20
+ unless ENV['TRAVIS_CI'] == 'true'
21
+ require 'simplecov'
22
+ SimpleCov.start
23
+ end
24
+
25
+ require 'the_array_comparator'
26
+ require 'the_array_comparator/testing_helper/data_set'
27
+ require 'the_array_comparator/testing_helper/test_data'
28
+ require 'the_array_comparator/testing_helper'
29
+
30
+ RSpec.configure do |c|
31
+ # c.treat_symbols_as_metadata_keys_with_true_values = true
32
+ # c.filter_run_including :focus => true
33
+ end
34
+
35
+ include TheArrayComparator
36
+ include TheArrayComparator::TestingHelper
37
+
38
+ #ENV['PATH'] = '/bin'
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pointrb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Max Meyer
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-02-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: active_support
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: middleware
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ description: Initialize project diretory base on templates
47
+ email:
48
+ - dev@fedux.org
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - API-GUIDE.md
54
+ - CONTRIBUTIONS.md
55
+ - Gemfile
56
+ - Gemfile.lock
57
+ - LICENSE.md
58
+ - README.md
59
+ - RELEASE_NOTES.md
60
+ - Rakefile
61
+ - TODO.md
62
+ - gemfiles/Gemfile.default
63
+ - gemfiles/Gemfile.travis
64
+ - lib/pointrb/version.rb
65
+ - pointrb.gemspec
66
+ - script/console
67
+ - script/terminal
68
+ - spec/spec_helper.rb
69
+ homepage: https://www.github.com/max_meyer/pointrb
70
+ licenses: []
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ requirements: []
88
+ rubyforge_project:
89
+ rubygems_version: 1.8.23
90
+ signing_key:
91
+ specification_version: 3
92
+ summary: ! 'PointRb is a project initializer which helps you to create a directory
93
+ structure for your project. It supports profiles so that you can use different layouts
94
+ for different projects: library, webapplication etc.'
95
+ test_files:
96
+ - spec/spec_helper.rb
97
+ has_rdoc: