idem 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ Y2MxYTI4MjZjYjE1NTY1YTQ5ZWU5ODFjMTk5NGQ0NjNjYjg2NWE4MQ==
5
+ data.tar.gz: !binary |-
6
+ MjFjNTg3NWVjZjM5NDlkNGU0MjkyMzY1MGM3MDA5MjZkMGEzYzU0Yw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZTkyM2I0N2Y4OWFkYjJiMzE5ODA3ZTljZWIzYzYxNmJiYzhmN2IyOTI4YjE0
10
+ NmE1ZjMxNjdmNzRlNTcxYjQzODNjZTc0NDA1ZDdhYTllZGI3YmY0YTQ5MzQ3
11
+ MDAyOGJlNjgwNGIxNjBmYjQzZDdjODYyMDliY2I2NDc2MDhlMGE=
12
+ data.tar.gz: !binary |-
13
+ YzljYzQ2Mzk2MGY1MzU1ZTIxMjA1YzlmY2E1MWJjMjNhNTU4NGRhMzIxM2Q4
14
+ YzZjNzJlYTFiMGJlZGRhM2Q3MmNkOGIyYzM1NmZkNGFhYzhmMDZlYTFhMDVk
15
+ OGYzZDRiMWRhMWQzZGUyZTNkNDU3NWIzYjNkN2M2NWYzNTA2N2M=
@@ -0,0 +1,37 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.sw[op]
15
+
16
+ ## Rubinius
17
+ *.rbc
18
+ .rbx
19
+
20
+ ## PROJECT::GENERAL
21
+ *.gem
22
+ coverage
23
+ profiling
24
+ turbulence
25
+ rdoc
26
+ pkg
27
+ tmp
28
+ doc
29
+ log
30
+ .yardoc
31
+ measurements
32
+
33
+ ## BUNDLER
34
+ .bundle
35
+ Gemfile.lock
36
+
37
+ ## PROJECT::SPECIFIC
data/.rspec ADDED
@@ -0,0 +1,5 @@
1
+ --color
2
+ --format progress
3
+ --profile
4
+ --warnings
5
+ --order random
@@ -0,0 +1 @@
1
+ idem
@@ -0,0 +1,23 @@
1
+ language: ruby
2
+ before_install: gem install bundler
3
+ bundler_args: --without yard guard benchmarks
4
+ script: "bundle exec rake ci"
5
+ rvm:
6
+ - 1.9.3
7
+ - 2.0.0
8
+ - ruby-head
9
+ - rbx-19mode
10
+ matrix:
11
+ include:
12
+ - rvm: jruby-19mode
13
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
14
+ - rvm: jruby-head
15
+ env: JRUBY_OPTS="$JRUBY_OPTS --debug"
16
+ allow_failures:
17
+ - rvm: ruby-head # travis broken
18
+ notifications:
19
+ irc:
20
+ channels:
21
+ - irc.freenode.org#rom-rb
22
+ on_success: never
23
+ on_failure: change
@@ -0,0 +1,4 @@
1
+ --quiet
2
+ README.md
3
+ lib/**/*.rb
4
+ LICENSE
@@ -0,0 +1,11 @@
1
+ Contributing
2
+ ------------
3
+
4
+ * If you want your code merged into the mainline, please discuss the proposed changes with me before doing any work on it. This library is still in early development, and the direction it is going may not always be clear. Some features may not be appropriate yet, may need to be deferred until later when the foundation for them is laid, or may be more applicable in a plugin.
5
+ * Fork the project.
6
+ * Make your feature addition or bug fix.
7
+ * Follow this [style guide](https://github.com/dkubb/styleguide).
8
+ * Add specs for it. This is important so I don't break it in a future version unintentionally. Tests must cover all branches within the code, and code must be fully covered.
9
+ * Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
10
+ * Run "rake ci". This must pass and not show any regressions in the metrics for the code to be merged.
11
+ * Send me a pull request. Bonus points for topic branches.
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ group :development, :test do
8
+ gem 'devtools', git: 'https://github.com/rom-rb/devtools.git'
9
+ end
10
+
11
+ eval_gemfile 'Gemfile.devtools'
@@ -0,0 +1,55 @@
1
+ # encoding: utf-8
2
+
3
+ group :development do
4
+ gem 'rake', '~> 10.1.0'
5
+ gem 'rspec', '~> 2.14.1'
6
+ gem 'yard', '~> 0.8.7'
7
+ end
8
+
9
+ group :yard do
10
+ gem 'kramdown', '~> 1.2.0'
11
+ end
12
+
13
+ group :guard do
14
+ gem 'guard', '~> 1.8.1'
15
+ gem 'guard-bundler', '~> 1.0.0'
16
+ gem 'guard-rspec', '~> 3.0.2'
17
+ gem 'guard-rubocop', '~> 0.2.0'
18
+ gem 'guard-mutant', '~> 0.0.1'
19
+
20
+ # file system change event handling
21
+ gem 'listen', '~> 1.3.0'
22
+ gem 'rb-fchange', '~> 0.0.6', require: false
23
+ gem 'rb-fsevent', '~> 0.9.3', require: false
24
+ gem 'rb-inotify', '~> 0.9.0', require: false
25
+
26
+ # notification handling
27
+ gem 'libnotify', '~> 0.8.0', require: false
28
+ gem 'rb-notifu', '~> 0.0.4', require: false
29
+ gem 'terminal-notifier-guard', '~> 1.5.3', require: false
30
+ end
31
+
32
+ group :metrics do
33
+ gem 'coveralls', '~> 0.6.7'
34
+ gem 'flay', '~> 2.4.0'
35
+ gem 'flog', '~> 4.1.1'
36
+ gem 'reek', '~> 1.3.2'
37
+ gem 'rubocop', '~> 0.13.0'
38
+ gem 'simplecov', '~> 0.7.1'
39
+ gem 'yardstick', '~> 0.9.7', git: 'https://github.com/dkubb/yardstick.git'
40
+
41
+ platforms :ruby_19, :ruby_20 do
42
+ gem 'mutant', git: 'https://github.com/mbj/mutant.git'
43
+ gem 'yard-spellcheck', '~> 0.1.5'
44
+ end
45
+ end
46
+
47
+ group :benchmarks do
48
+ gem 'rbench', '~> 0.2.3'
49
+ end
50
+
51
+ platform :jruby do
52
+ group :jruby do
53
+ gem 'jruby-openssl', '~> 0.8.5'
54
+ end
55
+ end
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+
3
+ guard :bundler do
4
+ watch('Gemfile')
5
+ watch('Gemfile.lock')
6
+ watch(%w{.+.gemspec\z})
7
+ end
8
+
9
+ guard :rspec, cli: File.read('.rspec').split.push('--fail-fast').join(' '), keep_failed: false do
10
+ # Run all specs if configuration is modified
11
+ watch('.rspec') { 'spec' }
12
+ watch('Guardfile') { 'spec' }
13
+ watch('Gemfile.lock') { 'spec' }
14
+ watch('spec/spec_helper.rb') { 'spec' }
15
+
16
+ # Run all specs if supporting files files are modified
17
+ watch(%r{\Aspec/(?:fixtures|lib|support|shared)/.+\.rb\z}) { 'spec' }
18
+
19
+ # Run unit specs if associated lib code is modified
20
+ watch(%r{\Alib/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}*"] }
21
+ watch(%r{\Alib/(.+)/support/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}/#{m[2]}*"] }
22
+ watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec' }
23
+
24
+ # Run a spec if it is modified
25
+ watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})
26
+ end
27
+
28
+ guard :rubocop, cli: %w[--config config/rubocop.yml] do
29
+ watch(%r{.+\.(?:rb|rake)\z})
30
+ watch(%r{\Aconfig/rubocop\.yml\z}) { |m| File.dirname(m[0]) }
31
+ watch(%r{(?:.+/)?\.rubocop\.yml\z}) { |m| File.dirname(m[0]) }
32
+ end
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Dan Kubb
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,23 @@
1
+ # idem
2
+
3
+ Memoize method return values
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/idem.png)][gem]
6
+ [![Build Status](https://secure.travis-ci.org/dkubb/idem.png?branch=master)][travis]
7
+ [![Dependency Status](https://gemnasium.com/dkubb/idem.png)][gemnasium]
8
+ [![Code Climate](https://codeclimate.com/github/dkubb/idem.png)][codeclimate]
9
+ [![Coverage Status](https://coveralls.io/repos/dkubb/idem/badge.png?branch=master)][coveralls]
10
+
11
+ [gem]: https://rubygems.org/gems/idem
12
+ [travis]: https://travis-ci.org/dkubb/idem
13
+ [gemnasium]: https://gemnasium.com/dkubb/idem
14
+ [codeclimate]: https://codeclimate.com/github/dkubb/idem
15
+ [coveralls]: https://coveralls.io/r/dkubb/idem
16
+
17
+ ## Contributing
18
+
19
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
20
+
21
+ ## Copyright
22
+
23
+ Copyright © 2013 Dan Kubb. See LICENSE for details.
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+
3
+ require 'devtools'
4
+
5
+ Devtools.init_rake_tasks
data/TODO ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ ---
2
+ unit_test_timeout: 0.1
@@ -0,0 +1,3 @@
1
+ ---
2
+ threshold: 0
3
+ total_score: 0
@@ -0,0 +1,2 @@
1
+ ---
2
+ threshold: 0
@@ -0,0 +1,3 @@
1
+ ---
2
+ name: idem
3
+ namespace: Idem
@@ -0,0 +1,103 @@
1
+ ---
2
+ Attribute:
3
+ enabled: true
4
+ exclude: []
5
+ BooleanParameter:
6
+ enabled: true
7
+ exclude: []
8
+ ClassVariable:
9
+ enabled: true
10
+ exclude: []
11
+ ControlParameter:
12
+ enabled: true
13
+ exclude: []
14
+ DataClump:
15
+ enabled: true
16
+ exclude: []
17
+ max_copies: 2
18
+ min_clump_size: 2
19
+ DuplicateMethodCall:
20
+ enabled: true
21
+ exclude: []
22
+ max_calls: 1
23
+ allow_calls: []
24
+ FeatureEnvy:
25
+ enabled: true
26
+ exclude: []
27
+ IrresponsibleModule:
28
+ enabled: true
29
+ exclude: []
30
+ LongParameterList:
31
+ enabled: true
32
+ exclude: []
33
+ max_params: 2
34
+ overrides:
35
+ initialize:
36
+ max_params: 3
37
+ LongYieldList:
38
+ enabled: true
39
+ exclude: []
40
+ max_params: 2
41
+ NestedIterators:
42
+ enabled: true
43
+ exclude: []
44
+ max_allowed_nesting: 1
45
+ ignore_iterators: []
46
+ NilCheck:
47
+ enabled: true
48
+ exclude: []
49
+ RepeatedConditional:
50
+ enabled: true
51
+ exclude: []
52
+ max_ifs: 1
53
+ TooManyInstanceVariables:
54
+ enabled: true
55
+ exclude: []
56
+ max_instance_variables: 3
57
+ TooManyMethods:
58
+ enabled: true
59
+ exclude: []
60
+ max_methods: 10
61
+ TooManyStatements:
62
+ enabled: true
63
+ exclude:
64
+ - each
65
+ max_statements: 2
66
+ UncommunicativeMethodName:
67
+ enabled: true
68
+ exclude: []
69
+ reject:
70
+ - !ruby/regexp /^[a-z]$/
71
+ - !ruby/regexp /[0-9]$/
72
+ - !ruby/regexp /[A-Z]/
73
+ accept: []
74
+ UncommunicativeModuleName:
75
+ enabled: true
76
+ exclude: []
77
+ reject:
78
+ - !ruby/regexp /^.$/
79
+ - !ruby/regexp /[0-9]$/
80
+ accept: []
81
+ UncommunicativeParameterName:
82
+ enabled: true
83
+ exclude: []
84
+ reject:
85
+ - !ruby/regexp /^.$/
86
+ - !ruby/regexp /[0-9]$/
87
+ - !ruby/regexp /[A-Z]/
88
+ accept: []
89
+ UncommunicativeVariableName:
90
+ enabled: true
91
+ exclude: []
92
+ reject:
93
+ - !ruby/regexp /^.$/
94
+ - !ruby/regexp /[0-9]$/
95
+ - !ruby/regexp /[A-Z]/
96
+ accept: []
97
+ UnusedParameters:
98
+ enabled: true
99
+ exclude: []
100
+ UtilityFunction:
101
+ enabled: true
102
+ exclude: []
103
+ max_helper_calls: 0
@@ -0,0 +1,62 @@
1
+ AllCops:
2
+ Includes:
3
+ - '../**/*.rake'
4
+ - 'Gemfile'
5
+ - 'Gemfile.devtools'
6
+ Excludes:
7
+ - '**/vendor/**'
8
+ - '**/benchmarks/**'
9
+
10
+ # Avoid parameter lists longer than five parameters.
11
+ ParameterLists:
12
+ Max: 3
13
+ CountKeywordArgs: true
14
+
15
+ # Avoid more than `Max` levels of nesting.
16
+ BlockNesting:
17
+ Max: 3
18
+
19
+ # Align with the style guide.
20
+ CollectionMethods:
21
+ PreferredMethods:
22
+ collect: 'map'
23
+ inject: 'reduce'
24
+ find: 'detect'
25
+ find_all: 'select'
26
+
27
+ # Do not force public/protected/private keyword to be indented at the same
28
+ # level as the def keyword. My personal preference is to outdent these keywords
29
+ # because I think when scanning code it makes it easier to identify the
30
+ # sections of code and visually separate them. When the keyword is at the same
31
+ # level I think it sort of blends in with the def keywords and makes it harder
32
+ # to scan the code and see where the sections are.
33
+ AccessControl:
34
+ Enabled: false
35
+
36
+ # Limit line length
37
+ LineLength:
38
+ Max: 79
39
+
40
+ # Disable documentation checking until a class needs to be documented once
41
+ Documentation:
42
+ Enabled: false
43
+
44
+ # Do not always use &&/|| instead of and/or.
45
+ AndOr:
46
+ Enabled: false
47
+
48
+ # Do not favor modifier if/unless usage when you have a single-line body
49
+ IfUnlessModifier:
50
+ Enabled: false
51
+
52
+ # Allow case equality operator (in limited use within the specs)
53
+ CaseEquality:
54
+ Enabled: false
55
+
56
+ # Constants do not always have to use SCREAMING_SNAKE_CASE
57
+ ConstantName:
58
+ Enabled: false
59
+
60
+ # Not all trivial readers/writers can be defined with attr_* methods
61
+ TrivialAccessors:
62
+ Enabled: false
@@ -0,0 +1,2 @@
1
+ ---
2
+ threshold: 100
@@ -0,0 +1,21 @@
1
+ # encoding: utf-8
2
+
3
+ require File.expand_path('../lib/idem/version', __FILE__)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = 'idem'
7
+ gem.version = Idem::VERSION.dup
8
+ gem.authors = ['Dan Kubb']
9
+ gem.email = 'dan.kubb@gmail.com'
10
+ gem.description = 'Memoize method return values'
11
+ gem.summary = gem.description
12
+ gem.homepage = 'https://github.com/dkubb/idem'
13
+ gem.licenses = %w[MIT]
14
+
15
+ gem.require_paths = %w[lib]
16
+ gem.files = `git ls-files`.split($/)
17
+ gem.test_files = `git ls-files -- spec/{unit,integration}`.split($/)
18
+ gem.extra_rdoc_files = %w[LICENSE README.md CONTRIBUTING.md TODO]
19
+
20
+ gem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5')
21
+ end
@@ -0,0 +1,4 @@
1
+ # encoding: utf-8
2
+
3
+ module Idem
4
+ end # Idem
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+
3
+ module Idem
4
+
5
+ # Gem version
6
+ VERSION = '0.0.0'.freeze
7
+
8
+ end # Idem
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+
3
+ if ENV['COVERAGE'] == 'true'
4
+ require 'simplecov'
5
+ require 'coveralls'
6
+
7
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
8
+ SimpleCov::Formatter::HTMLFormatter,
9
+ Coveralls::SimpleCov::Formatter
10
+ ]
11
+
12
+ SimpleCov.start do
13
+ command_name 'spec:unit'
14
+
15
+ add_filter 'config'
16
+ add_filter 'spec'
17
+ add_filter 'vendor'
18
+
19
+ minimum_coverage 100
20
+ end
21
+ end
22
+
23
+ require 'devtools/spec_helper'
24
+ require 'idem'
25
+
26
+ RSpec.configure do |config|
27
+ config.expect_with :rspec do |expect_with|
28
+ expect_with.syntax = :expect
29
+ end
30
+ end
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: idem
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Dan Kubb
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-09-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 1.3.5
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.3.5
33
+ description: Memoize method return values
34
+ email: dan.kubb@gmail.com
35
+ executables: []
36
+ extensions: []
37
+ extra_rdoc_files:
38
+ - LICENSE
39
+ - README.md
40
+ - CONTRIBUTING.md
41
+ - TODO
42
+ files:
43
+ - .gitignore
44
+ - .rspec
45
+ - .ruby-gemset
46
+ - .travis.yml
47
+ - .yardopts
48
+ - CONTRIBUTING.md
49
+ - Gemfile
50
+ - Gemfile.devtools
51
+ - Guardfile
52
+ - LICENSE
53
+ - README.md
54
+ - Rakefile
55
+ - TODO
56
+ - config/devtools.yml
57
+ - config/flay.yml
58
+ - config/flog.yml
59
+ - config/mutant.yml
60
+ - config/reek.yml
61
+ - config/rubocop.yml
62
+ - config/yardstick.yml
63
+ - idem.gemspec
64
+ - lib/idem.rb
65
+ - lib/idem/version.rb
66
+ - spec/spec_helper.rb
67
+ homepage: https://github.com/dkubb/idem
68
+ licenses:
69
+ - MIT
70
+ metadata: {}
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ! '>='
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubyforge_project:
87
+ rubygems_version: 2.1.1
88
+ signing_key:
89
+ specification_version: 4
90
+ summary: Memoize method return values
91
+ test_files: []
92
+ has_rdoc: