AvrijAnalyticsUtility 0.4.7 → 0.4.8

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: 026bf3e9743ec085657e9dc477aedd0f77dbd519
4
- data.tar.gz: fae77cb0f96760a704de45606c81456467e8f5ee
3
+ metadata.gz: 53cae9f41406fa13aad6265bc6d44246e9598817
4
+ data.tar.gz: ec3c9e0d5c474c46190ed2ff02e1d8b06c6d50ae
5
5
  SHA512:
6
- metadata.gz: 2eee8573c26941988a81544281223baf37774382e5ea2a991fb7ce369f5e52faa25381ecff41c1c21df05c9d9fd6301c0bf83c1c57fdf911feef82181094b5be
7
- data.tar.gz: 0e7c3342899c456041bdf1711dd72231d1978ff7bc1f4905576dd42f286034ae502e2ea95ff384261a2f656d0529be57929858f6fc60ad07c356347bfc194267
6
+ metadata.gz: b8506e44845c4623e3347e0cc65553bb4d27200de12703bdc911b9b89c7e1024fb83f74da56b29f7f1648ff3be7752f764407fbeff8db20efc051bb9ea672e03
7
+ data.tar.gz: 3a44b0bd175a21db77b9f83b870c4b824f2833d8f09d284f63b1b8b4f1acca9d818056865f03ece877f7b3d8c926c51971f776ff9c08a05a81b8562213b6d822
data/Rakefile CHANGED
@@ -14,8 +14,43 @@ task :releasegem do
14
14
  `rake build`
15
15
  `gem push pkg/AvrijAnalyticsUtility-#{AvrijAnalyticsUtility::VERSION}.gem`
16
16
  `gem install pkg/AvrijAnalyticsUtility-#{AvrijAnalyticsUtility::VERSION}.gem`
17
-
18
17
  end
19
18
 
19
+ LEVELS = [:major, :minor, :patch]
20
20
 
21
+ def version
22
+ @version ||= begin
23
+ v = `git describe --always --tags`
24
+ {}.tap do |h|
25
+ h[:major], h[:minor], h[:patch], h[:rev], h[:rev_hash] = v[1..-1].split(/[.-]/)
26
+ end
27
+ end
28
+ end
29
+
30
+ def increment(level)
31
+ v = version.dup
32
+ v[level] = v[level].to_i + 1
33
+
34
+ to_zero = LEVELS[LEVELS.index(level)+1..LEVELS.size]
35
+ to_zero.each{ |z| v[z] = 0 }
36
+
37
+ Rake::Task["version:set"].invoke(v[:major], v[:minor], v[:patch])
38
+ end
39
+
40
+ desc "Display version"
41
+ task :version do
42
+ puts "Current version: #{`git describe --always --tags`}"
43
+ end
44
+
45
+ namespace :version do
46
+ LEVELS.each do |l|
47
+ desc "Increment #{l} version"
48
+ task l.to_sym do increment(l.to_sym) end
49
+ end
50
+
51
+ desc "Set specific major, minor and patch"
52
+ task :set, [:major, :minor, :patch] do |_, args|
53
+ sh "git tag v#{args[:major]}.#{args[:minor]}.#{args[:patch]} && git push --tags"
54
+ end
55
+ end
21
56
 
@@ -1,6 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'httparty'
3
3
  require 'json'
4
+ require 'AvrijAnalyticsUtility/APIConnector'
4
5
 
5
6
  class AvrijAnalyticsUtility::EyesoverConnector < APIConnector
6
7
  def getAllEntities()
@@ -1,3 +1,3 @@
1
1
  module AvrijAnalyticsUtility
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: AvrijAnalyticsUtility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Dalisay
@@ -128,7 +128,7 @@ licenses:
128
128
  - MIT
129
129
  metadata:
130
130
  allowed_push_host: https://rubygems.org
131
- post_install_message: 'AvrijAnalyticsUtility VERSION : 0.4.7'
131
+ post_install_message: 'AvrijAnalyticsUtility VERSION : 0.4.8'
132
132
  rdoc_options: []
133
133
  require_paths:
134
134
  - lib