hsql 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -3
- data/hsql.gemspec +2 -2
- data/lib/hsql/data.rb +8 -8
- data/lib/hsql/file.rb +2 -6
- data/lib/hsql/query.rb +1 -1
- data/lib/hsql/template.rb +1 -1
- data/lib/hsql/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a103cbdb9c7ac85ac94e45f674a9f3d52b57630
|
4
|
+
data.tar.gz: a4f342333263639276c2809ab7550098b5837ea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3b01532699b00040ce951221807929789badf2c26327f48467d339ebad5fd7f9711eeec59c80a2d76fe35bd044c85018211a32f4ead0fe4e9d0a20dc8236bfb
|
7
|
+
data.tar.gz: 20a5d910c8310d9681e62f3ea0dd2c1067a9006aecff9e349ebcc72abec9e4b3caa1d148bb149b721353216f3c040780d709d4cea7d743d11cdd91b83a75c29a
|
data/.rubocop.yml
CHANGED
data/hsql.gemspec
CHANGED
@@ -21,9 +21,9 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_dependency 'mustache', '> 0'
|
23
23
|
spec.add_dependency 'activesupport', '> 0'
|
24
|
-
spec.add_dependency 'pg_query', '
|
24
|
+
spec.add_dependency 'pg_query', '~> 0.8.0'
|
25
25
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
26
|
-
spec.add_development_dependency 'rubocop', '
|
26
|
+
spec.add_development_dependency 'rubocop', '0.37.2'
|
27
27
|
spec.add_development_dependency 'rake', '> 0'
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.3'
|
29
29
|
spec.add_development_dependency 'timecop', '~> 0.8.0'
|
data/lib/hsql/data.rb
CHANGED
@@ -37,7 +37,7 @@ module HSQL
|
|
37
37
|
moments = []
|
38
38
|
|
39
39
|
moments += [
|
40
|
-
['now', moment, 'The moment provided via --date or --timestamp (defaults to the current system time)']
|
40
|
+
['now', moment, 'The moment provided via --date or --timestamp (defaults to the current system time)']
|
41
41
|
]
|
42
42
|
|
43
43
|
moments += [
|
@@ -52,41 +52,41 @@ module HSQL
|
|
52
52
|
['end_of_week', moment.end_of_week, 'The last second of the week'],
|
53
53
|
['end_of_month', moment.end_of_month, 'The last second of the month'],
|
54
54
|
['end_of_quarter', moment.end_of_quarter, 'The last second of the quarter'],
|
55
|
-
['end_of_year', moment.end_of_year, 'The last second of the year']
|
55
|
+
['end_of_year', moment.end_of_year, 'The last second of the year']
|
56
56
|
]
|
57
57
|
|
58
58
|
# Time ranges immediately preceding the one in which `time` appears.
|
59
59
|
moment = time - 1.hour
|
60
60
|
moments += [
|
61
61
|
['beginning_of_previous_hour', moment.beginning_of_hour, 'The first second of the previous hour'],
|
62
|
-
['end_of_previous_hour', moment.end_of_hour, 'The last second of the previous hour']
|
62
|
+
['end_of_previous_hour', moment.end_of_hour, 'The last second of the previous hour']
|
63
63
|
]
|
64
64
|
|
65
65
|
moment = time - 1.day
|
66
66
|
moments += [
|
67
67
|
['beginning_of_previous_day', moment.beginning_of_day, 'The first second of the previous day'],
|
68
|
-
['end_of_previous_day', moment.end_of_day, 'The last second of the previous day']
|
68
|
+
['end_of_previous_day', moment.end_of_day, 'The last second of the previous day']
|
69
69
|
]
|
70
70
|
|
71
71
|
moment = time - 1.week
|
72
72
|
moments += [
|
73
73
|
['beginning_of_previous_week', moment.beginning_of_week, 'The first second of the previous week'],
|
74
|
-
['end_of_previous_week', moment.end_of_week, 'The last second of the previous week']
|
74
|
+
['end_of_previous_week', moment.end_of_week, 'The last second of the previous week']
|
75
75
|
]
|
76
76
|
moment = time - 1.month
|
77
77
|
moments += [
|
78
78
|
['beginning_of_previous_month', moment.beginning_of_month, 'The first second of the previous month'],
|
79
|
-
['end_of_previous_month', moment.end_of_month, 'The last second of the previous month']
|
79
|
+
['end_of_previous_month', moment.end_of_month, 'The last second of the previous month']
|
80
80
|
]
|
81
81
|
moment = time - 3.months
|
82
82
|
moments += [
|
83
83
|
['beginning_of_previous_quarter', moment.beginning_of_quarter, 'The first second of the previous quarter'],
|
84
|
-
['end_of_previous_quarter', moment.end_of_quarter, 'The last second of the previous quarter']
|
84
|
+
['end_of_previous_quarter', moment.end_of_quarter, 'The last second of the previous quarter']
|
85
85
|
]
|
86
86
|
moment = time - 1.year
|
87
87
|
moments += [
|
88
88
|
['beginning_of_previous_year', moment.beginning_of_year, 'The first second of the previous year'],
|
89
|
-
['end_of_previous_year', moment.end_of_year, 'The last second of the previous year']
|
89
|
+
['end_of_previous_year', moment.end_of_year, 'The last second of the previous year']
|
90
90
|
]
|
91
91
|
|
92
92
|
moments
|
data/lib/hsql/file.rb
CHANGED
@@ -28,13 +28,9 @@ module HSQL
|
|
28
28
|
new(source, options).parse!
|
29
29
|
end
|
30
30
|
|
31
|
-
|
32
|
-
metadata.to_yaml
|
33
|
-
end
|
31
|
+
delegate :to_yaml, to: :metadata
|
34
32
|
|
35
|
-
|
36
|
-
metadata.to_json
|
37
|
-
end
|
33
|
+
delegate :to_json, to: :metadata
|
38
34
|
|
39
35
|
def metadata
|
40
36
|
@metadata ||= begin
|
data/lib/hsql/query.rb
CHANGED
data/lib/hsql/template.rb
CHANGED
data/lib/hsql/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hsql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Danger Canty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mustache
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: pg_query
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.8.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.8.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: rubocop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.37.2
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.37.2
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
189
|
rubyforge_project:
|
190
|
-
rubygems_version: 2.
|
190
|
+
rubygems_version: 2.5.1
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: Store a hash of data with your SQL queries.
|