Permalink
Browse files

Rip out Veritas::Immutable into a standalone gem.

  • Loading branch information...
0 parents commit 8b4ee56586008bee94117573fe431d2f76bbac51 Markus Schirp committed Aug 2, 2012
@@ -0,0 +1,4 @@
+/Gemfile.lock
+/coverage
+/tmp
+/.rbx
@@ -0,0 +1,53 @@
+# encoding: utf-8
+
+source 'https://rubygems.org'
+
+gem 'backports', '~> 2.6.1'
+
+group :development do
+ gem 'jeweler', '~> 1.8.3'
+ gem 'rake', '~> 0.9.2'
+ gem 'rspec', '~> 1.3.2'
+ gem 'yard', '~> 0.8.1'
+end
+
+group :guard do
+ gem 'guard', '~> 1.1.1'
+ gem 'guard-bundler', '~> 0.1.3'
+ gem 'guard-rspec', '~> 0.7.3'
+end
+
+group :benchmarks do
+ gem 'rbench', '~> 0.2.3'
+end
+
+platform :jruby do
+ group :jruby do
+ gem 'jruby-openssl', '~> 0.7.4'
+ end
+end
+
+group :metrics do
+ gem 'flay', '~> 1.4.2'
+ gem 'flog', '~> 2.5.1'
+ gem 'reek', '~> 1.2.8', :github => 'dkubb/reek'
+ gem 'roodi', '~> 2.1.0'
+ gem 'yardstick', '~> 0.5.0'
+ gem 'yard-spellcheck', '~> 0.1.5'
+
+ platforms :mri_18 do
+ gem 'arrayfields', '~> 4.7.4' # for metric_fu
+ gem 'fattr', '~> 2.2.0' # for metric_fu
+ gem 'heckle', '~> 1.4.3'
+ gem 'json', '~> 1.7.3' # for metric_fu rake task
+ gem 'map', '~> 6.0.1' # for metric_fu
+ gem 'metric_fu', '~> 2.1.1'
+ gem 'mspec', '~> 1.5.17'
+ gem 'rcov', '~> 1.0.0'
+ gem 'ruby2ruby', '= 1.2.2' # for heckle
+ end
+
+ platforms :rbx do
+ gem 'pelusa', '~> 0.2.1'
+ end
+end
@@ -0,0 +1,18 @@
+# encoding: utf-8
+
+guard :bundler do
+ watch('Gemfile')
+end
+
+guard :rspec do
+ # run all specs if the spec_helper or supporting files files are modified
+ watch('spec/spec_helper.rb') { 'spec' }
+ watch(%r{\Aspec/(?:lib|support|shared)/.+\.rb\z}) { 'spec' }
+
+ # run unit specs if associated lib code is modified
+ watch(%r{\Alib/(.+)\.rb\z}) { |m| Dir["spec/unit/#{m[1]}"] }
+ watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec' }
+
+ # run a spec if it is modified
+ watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})
+end
@@ -0,0 +1,9 @@
+# encoding: utf-8
+
+require 'rake'
+
+require File.expand_path('../lib/immutable/version', __FILE__)
+
+FileList['tasks/**/*.rake'].each { |task| import task }
+
+task :default => :spec
@@ -0,0 +1,3 @@
+---
+threshold: 9
+total_score: 29
@@ -0,0 +1,2 @@
+---
+threshold: 21.9
@@ -0,0 +1,18 @@
+---
+AbcMetricMethodCheck: { score: 10.3 }
+AssignmentInConditionalCheck: { }
+CaseMissingElseCheck: { }
+ClassLineCountCheck: { line_count: 293 }
+ClassNameCheck: { pattern: !ruby/regexp '/\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/' }
+ClassVariableCheck: { }
+CyclomaticComplexityBlockCheck: { complexity: 2 }
+CyclomaticComplexityMethodCheck: { complexity: 4 }
+EmptyRescueBodyCheck: { }
+ForLoopCheck: { }
+# TODO: decrease line_count to 5 to 10
+MethodLineCountCheck: { line_count: 14 }
+MethodNameCheck: { pattern: !ruby/regexp '/\A(?:[a-z\d](?:_?[a-z\d])+[?!=]?|\[\]=?|==|<=>|[+*&|-])\z/' }
+ModuleLineCountCheck: { line_count: 295 }
+ModuleNameCheck: { pattern: !ruby/regexp '/\A(?:[A-Z]+|[A-Z][a-z](?:[A-Z]?[a-z])+)\z/' }
+# TODO: decrease parameter_count to 2 or less
+ParameterNumberCheck: { parameter_count: 3 }
@@ -0,0 +1,91 @@
+---
+UncommunicativeParameterName:
+ accept: []
+ exclude: []
+ enabled: true
+ reject:
+ - !ruby/regexp /^.$/
+ - !ruby/regexp /[0-9]$/
+ - !ruby/regexp /[A-Z]/
+LargeClass:
+ max_methods: 10
+ exclude: []
+ enabled: true
+ max_instance_variables: 2
+UncommunicativeMethodName:
+ accept: []
+ exclude: []
+ enabled: true
+ reject:
+ - !ruby/regexp /^[a-z]$/
+ - !ruby/regexp /[0-9]$/
+ - !ruby/regexp /[A-Z]/
+LongParameterList:
+ max_params: 2 # TODO: decrease max_params to 2
+ exclude: []
+ enabled: true
+ overrides: {}
+FeatureEnvy:
+ exclude: []
+ enabled: true
+ClassVariable:
+ exclude: []
+ enabled: true
+BooleanParameter:
+ exclude: []
+ enabled: true
+IrresponsibleModule:
+ exclude: []
+ enabled: true
+UncommunicativeModuleName:
+ accept: []
+ exclude: []
+ enabled: true
+ reject:
+ - !ruby/regexp /^.$/
+ - !ruby/regexp /[0-9]$/
+NestedIterators:
+ ignore_iterators: []
+ exclude: []
+ enabled: true
+ max_allowed_nesting: 1
+LongMethod:
+ max_statements: 7 # TODO: decrease max_statements to 5 or less
+ exclude: []
+ enabled: true
+Duplication:
+ allow_calls: []
+ exclude: []
+ enabled: true
+ max_calls: 1
+UtilityFunction:
+ max_helper_calls: 1
+ exclude: []
+ enabled: true
+Attribute:
+ exclude: []
+ enabled: false
+UncommunicativeVariableName:
+ accept: []
+ exclude: []
+ enabled: true
+ reject:
+ - !ruby/regexp /^.$/
+ - !ruby/regexp /[0-9]$/
+ - !ruby/regexp /[A-Z]/
+SimulatedPolymorphism:
+ exclude: []
+ enabled: true
+ max_ifs: 1
+DataClump:
+ exclude: []
+ enabled: true
+ max_copies: 1
+ min_clump_size: 3
+ControlCouple:
+ exclude: []
+ enabled: true
+LongYieldList:
+ max_params: 1
+ exclude: []
+ enabled: true
@@ -0,0 +1,2 @@
+---
+threshold: 100
@@ -0,0 +1,20 @@
+# -*- encoding: utf-8 -*-
+
+require File.expand_path('../lib/immutable/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.name = 'immutable'
+ gem.version = Virtus::VERSION
+ gem.authors = [ 'Dan Kubb', 'Markus Schirp' ]
+ gem.email = [ 'dan.kubb@gmail.com', 'mbj@seonic.net' ]
+ gem.description = 'Immutable extensions to objects'
+ gem.summary = gem.description
+ gem.homepage = 'https://github.com/mbj/immutable'
+
+ gem.require_paths = [ 'lib' ]
+ gem.files = `git ls-files`.split("\n")
+ gem.test_files = `git ls-files -- {spec}/*`.split("\n")
+ gem.extra_rdoc_files = %w[LICENSE README.md TODO]
+
+ gem.add_runtime_dependency('backports', '~> 2.6.1')
+end
Oops, something went wrong.

0 comments on commit 8b4ee56

Please sign in to comment.