asyncable 0.1.1 → 0.1.2

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: aabe4e759a2c4de508c15a37967de123dfcdc14b
4
- data.tar.gz: a0279830b3c30b57f313aa66860ab731ee76ce95
3
+ metadata.gz: 2252dbc9ad828edba032407e226c7b6803a5c14c
4
+ data.tar.gz: 7c0513b5399104620544b0ca025e90c831f86c67
5
5
  SHA512:
6
- metadata.gz: aac35efbe2799031d8546f973ec6aafb707fbce7afb8d027af589f30347c85569328077092840e93d92e4b6908857f11339ad2c295cdde7ee77ed7010b8f2feb
7
- data.tar.gz: 7c125fc7fdffc1e94fed3dd97e5cc4fd81487a99e972ca4d05645d0311c43acc45ee2c37ed5f540697381d1f801ab666d6e7bc81d2f4ed628b9ea63fe80c7438
6
+ metadata.gz: 07cbcf44fb7fa2e380c240bda354a9d5edb4cb715eb693e588dd5668c11e0b687f8240af4ddee19b93ad1fd3ac45577a3215dc6d1c65a86eb070b892bbcaf812
7
+ data.tar.gz: 136ec3d0fd25a8cea9b8c8d134ca242efc153a577dd9dbf5ef569462283e79a8fed9eac271b9c158bd0c03b66040340d0673671fc32ef868674d110a0d3efea1
data/asyncable.gemspec CHANGED
@@ -29,4 +29,6 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency "bundler", "~> 1.12"
30
30
  spec.add_development_dependency "rake", "~> 10.0"
31
31
  spec.add_development_dependency "rspec", "~> 3.0"
32
+
33
+ spec.add_dependency 'activesupport'
32
34
  end
@@ -0,0 +1,11 @@
1
+ module Asyncable
2
+ module ActiveRecordScopes
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ scope :processing, -> { where(status: Statuses::PROCESSING) }
7
+ scope :failed, -> { where(status: Statuses::FAILED) }
8
+ scope :succeeded, -> { where(status: Statuses::SUCCEEDED) }
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Asyncable
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/asyncable.rb CHANGED
@@ -1,4 +1,5 @@
1
- require "asyncable/version"
1
+ require 'asyncable/version'
2
+ require 'active_support/all'
2
3
 
3
4
  module Asyncable
4
5
  module Statuses
@@ -73,3 +74,5 @@ module Asyncable
73
74
  end
74
75
  # === END HOOKS ===
75
76
  end
77
+
78
+ require_relative './asyncable/active_support_scopes'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asyncable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Francis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-10 00:00:00.000000000 Z
11
+ date: 2017-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: Simple ruby gem to provide an API for managing async processes
56
70
  email:
57
71
  - ryan@launchpadlab.com
@@ -69,6 +83,7 @@ files:
69
83
  - bin/console
70
84
  - bin/setup
71
85
  - lib/asyncable.rb
86
+ - lib/asyncable/active_record_scopes.rb
72
87
  - lib/asyncable/version.rb
73
88
  homepage: https://github.com/LaunchPadLab/asyncable
74
89
  licenses: []