fhwang-wisper-mongoid 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e37dcd3e930ce14156e0a47db00a2c91c42904bd
4
- data.tar.gz: 1177c7a81f51e1662868be879e057f3a8084b13e
3
+ metadata.gz: 4faf18ee3a848c1cfe042caf541b8749c95da935
4
+ data.tar.gz: 5bfcdad8757e69b6c1561a8dfea2188585b2e2e8
5
5
  SHA512:
6
- metadata.gz: d7ae1facc4341726c82bdbf53f1d1c12e61bfb0ef6a828e7c4972db25b77ed41f6f0732355288a0cda47dfe052ff5e1f2fec875951e3e766fd36dfdff00aa3d7
7
- data.tar.gz: da5c17d2b99d9ef44aa1d006b45ad8934a09608bbdd1789f3e4c53caf129a69b9ca923b6f8d54462d621c0d1eb8ccb5511079efb1988b42898cf1b369ff30487
6
+ metadata.gz: 7598f3ab71e1b33c4e43d0c0f1c8e28550d075f46b89ca2d733ae643b911ee911b18b9a0a99e186634612d5192c674dc718a7bf2321c21cba6ac918b5dec9ebe
7
+ data.tar.gz: b1d5f91769c54fad1bd47335f0592e7348e8df19094e6213f223c85f8ef994093f8fa1fb135bee5d87b256c0a733e7d560e1617ba0f9991979e7afe1a4646b47
@@ -0,0 +1,56 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ jobs:
7
+ build:
8
+ docker:
9
+ # specify the version you desire here
10
+ - image: circleci/ruby:2.4.1-node-browsers
11
+ - image: circleci/mongo:3.6.9
12
+
13
+ # Specify service dependencies here if necessary
14
+ # CircleCI maintains a library of pre-built images
15
+ # documented at https://circleci.com/docs/2.0/circleci-images/
16
+ # - image: circleci/postgres:9.4
17
+
18
+ working_directory: ~/repo
19
+
20
+ steps:
21
+ - checkout
22
+
23
+ - run:
24
+ name: Configure Bundler
25
+ command: |
26
+ echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
27
+ source $BASH_ENV
28
+ gem install bundler
29
+
30
+ - run:
31
+ name: install dependencies
32
+ command: |
33
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
34
+
35
+ # run tests!
36
+ - run:
37
+ name: run tests
38
+ command: |
39
+ mkdir /tmp/test-results
40
+ TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
41
+ circleci tests split --split-by=timings)"
42
+
43
+ bundle exec rspec \
44
+ --format progress \
45
+ -r rspec_junit_formatter \
46
+ --format RspecJunitFormatter \
47
+ --out /tmp/test-results/rspec/results.xml \
48
+ --format progress \
49
+ $TEST_FILES
50
+
51
+ # collect reports
52
+ - store_test_results:
53
+ path: /tmp/test-results
54
+ - store_artifacts:
55
+ path: /tmp/test-results
56
+ destination: test-results
data/.codeclimate.yml ADDED
@@ -0,0 +1,38 @@
1
+ version: "2" # required to adjust maintainability checks
2
+ checks:
3
+ argument-count:
4
+ config:
5
+ threshold: 4
6
+ complex-logic:
7
+ config:
8
+ threshold: 4
9
+ file-lines:
10
+ config:
11
+ threshold: 250
12
+ method-complexity:
13
+ config:
14
+ threshold: 5
15
+ method-count:
16
+ config:
17
+ threshold: 20
18
+ method-lines:
19
+ config:
20
+ threshold: 25
21
+ nested-control-flow:
22
+ config:
23
+ threshold: 4
24
+ return-statements:
25
+ config:
26
+ threshold: 4
27
+ similar-code:
28
+ config:
29
+ threshold: 150
30
+ identical-code:
31
+ config:
32
+ threshold: 75
33
+ plugins:
34
+ reek:
35
+ enabled: true
36
+ rubocop:
37
+ enabled: true
38
+
data/.reek.yml ADDED
@@ -0,0 +1,9 @@
1
+ ---
2
+ detectors:
3
+ DuplicateMethodCall:
4
+ max_calls: 3
5
+ UtilityFunction:
6
+ public_methods_only: true
7
+
8
+ exclude_paths:
9
+ - spec
data/.rubocop.yml ADDED
@@ -0,0 +1,60 @@
1
+ Layout/ExtraSpacing:
2
+ Enabled: false
3
+
4
+ Layout/SpaceAroundOperators:
5
+ Enabled: false
6
+
7
+ Layout/SpaceInsideHashLiteralBraces:
8
+ Enabled: false
9
+
10
+ Layout/TrailingBlankLines:
11
+ Enabled: false
12
+
13
+ Metrics/BlockLength:
14
+ Exclude:
15
+ - 'spec/**/*'
16
+ - 'sync_machine.gemspec'
17
+
18
+ Metrics/LineLength:
19
+ Max: 100
20
+
21
+ # Handled by Reek
22
+ Metrics/MethodLength:
23
+ Enabled: false
24
+
25
+ Style/BlockDelimiters:
26
+ Enabled: false
27
+
28
+ Style/EmptyMethod:
29
+ Exclude:
30
+ - 'spec/**/*'
31
+
32
+ Style/ExpandPathArguments:
33
+ Enabled: false
34
+
35
+ Style/MethodMissing:
36
+ Enabled: false
37
+
38
+ Style/PercentLiteralDelimiters:
39
+ Enabled: false
40
+
41
+ Style/RandomWithOffset:
42
+ Enabled: false
43
+
44
+ Style/StringLiterals:
45
+ Enabled: false
46
+
47
+ Style/SymbolArray:
48
+ Enabled: false
49
+
50
+ Style/SymbolProc:
51
+ Exclude:
52
+ - 'spec/**/*'
53
+
54
+ Style/UnneededPercentQ:
55
+ Enabled: false
56
+
57
+ Lint/HandleExceptions:
58
+ Exclude:
59
+ - Rakefile
60
+ - spec/spec_helper.rb
data/Gemfile CHANGED
@@ -1,14 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
-
5
- gem 'rubysl', '~> 2.0', platforms: :rbx
6
-
7
- gem 'bundler'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'pry'
11
-
12
- group :metrics do
13
- gem 'flay'
14
- end
@@ -1,11 +1,13 @@
1
1
  require 'wisper/mongoid/version'
2
2
  require 'wisper/mongoid/publisher'
3
3
 
4
+ # A micro library providing Ruby objects with Publish-Subscribe capabilities.
4
5
  module Wisper
5
6
  def self.model
6
7
  ::Wisper::Mongoid::Publisher
7
8
  end
8
9
 
10
+ # Integrates Wisper wih Mongoid.
9
11
  module Mongoid
10
12
  def self.extend_all
11
13
  ::Mongoid::Document.class_eval { include Wisper.model }
@@ -1,5 +1,6 @@
1
1
  module Wisper
2
2
  module Mongoid
3
+ # Broadcasts Wisper events when Mongoid records are saved.
3
4
  module Publisher
4
5
  extend ActiveSupport::Concern
5
6
  included do
@@ -1,5 +1,5 @@
1
1
  module Wisper
2
2
  module Mongoid
3
- VERSION = '0.2.0'
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  end
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'wisper/mongoid/version'
@@ -17,9 +16,11 @@ Gem::Specification.new do |spec|
17
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
18
  spec.require_paths = ['lib']
20
- spec.required_ruby_version = '>= 1.9.3'
21
19
 
22
- spec.add_dependency 'wisper'
20
+ spec.add_dependency 'activesupport'
23
21
  spec.add_dependency 'mongoid', '>= 6'
22
+ spec.add_dependency 'wisper'
23
+
24
24
  spec.add_development_dependency "rspec"
25
+ spec.add_development_dependency "rspec_junit_formatter"
25
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fhwang-wisper-mongoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Hwang
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-03-17 00:00:00.000000000 Z
12
+ date: 2019-06-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: wisper
15
+ name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
@@ -39,6 +39,20 @@ dependencies:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '6'
42
+ - !ruby/object:Gem::Dependency
43
+ name: wisper
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: rspec
44
58
  requirement: !ruby/object:Gem::Requirement
@@ -53,6 +67,20 @@ dependencies:
53
67
  - - ">="
54
68
  - !ruby/object:Gem::Version
55
69
  version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rspec_junit_formatter
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
56
84
  description: Subscribe to changes on Mongoid models
57
85
  email:
58
86
  - sera@fhwang.net
@@ -60,8 +88,12 @@ executables: []
60
88
  extensions: []
61
89
  extra_rdoc_files: []
62
90
  files:
91
+ - ".circleci/config.yml"
92
+ - ".codeclimate.yml"
63
93
  - ".gitignore"
94
+ - ".reek.yml"
64
95
  - ".rspec"
96
+ - ".rubocop.yml"
65
97
  - ".travis.yml"
66
98
  - CHANGELOG.md
67
99
  - Gemfile
@@ -91,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
123
  requirements:
92
124
  - - ">="
93
125
  - !ruby/object:Gem::Version
94
- version: 1.9.3
126
+ version: '0'
95
127
  required_rubygems_version: !ruby/object:Gem::Requirement
96
128
  requirements:
97
129
  - - ">="