hammerstore 0.0.1 → 0.0.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: b856d43cf2fa1168f640b3782d96dcc3bfc06892
4
- data.tar.gz: fdbadfb55318a05883717e412edf31f5145079a9
3
+ metadata.gz: 66316742c2de9cdefe741b6f2b6c406e5543dc2a
4
+ data.tar.gz: f50121cce64f50f893ed047f55a80c79220a0994
5
5
  SHA512:
6
- metadata.gz: 915e7123a9b03db0964e0a2ecd50c1e02cf40f4529e8f8d1372ed50adbf4af6b300d189e0250870d95a14a7b768dee7f82f45690f32c4e5217da2cb518092fb3
7
- data.tar.gz: cc3b2d43f712676526520a2a15bfc6e7d490019c8df152b78446d9fe6885b1b9b17b18baba9d0cfd7efd96c7c8daece15eef641eace76e79a021e209a2e9a735
6
+ metadata.gz: 547da8770f25fe4abc2b0df374f68cec8aa29b565965ecdc48645c5aab6305cf570cb30ce23b6d2a4b072d48df9683842376987c5e8a9289aa442a291a83331f
7
+ data.tar.gz: 8187228df47aa400bfb6386be54edfaf3ca43d1f45c1117ebab01da0ee2aabd73c2cba570501ef7255e767505a70147232f9e122a2254973bccad8d4c635a87d
@@ -2,7 +2,6 @@ language: ruby
2
2
  cache: bundler
3
3
  before_install:
4
4
  - sudo apt-get update
5
- - echo $(pwd)
6
5
  - sudo apt-get install libsnappy-dev
7
6
  - git clone git://github.com/spotify/sparkey.git
8
7
  - cd sparkey
data/README.md CHANGED
@@ -22,6 +22,49 @@ cache = BasicCache.new store
22
22
 
23
23
  ## Installation
24
24
 
25
+ ### Dependencies
26
+
27
+ #### sparkey
28
+
29
+ You'll need to have [sparkey](https://github.com/spotify/sparkey) installed in order to install the dependencies for hammerstore. To do this on Debian/Ubuntu, run the following:
30
+
31
+ ```
32
+ apt-get install libsnappy-dev
33
+ git clone git://github.com/spotify/sparkey.git
34
+ cd sparkey
35
+ autoreconf --install
36
+ ./configure --prefix=/usr
37
+ make
38
+ make install
39
+ ```
40
+
41
+ To do this on a Mac, run the following:
42
+
43
+ ```
44
+ brew install https://raw.githubusercontent.com/akerl/homebrew-formulae/master/sparkey.rb
45
+ ```
46
+
47
+ ### gnista
48
+
49
+ On OSX, the released gnista gem (version 0.0.5) can't be used due to [a segfault bug](https://github.com/emnl/gnista/pull/4). You can download and install the fixed version manually:
50
+
51
+ ```
52
+ git clone git://github.com/emnl/gnista
53
+ cd gnista
54
+ rake install
55
+ ```
56
+
57
+ If your libraries and includes are installed in custom locations, you'll need to specify that:
58
+
59
+ ```
60
+ rake build
61
+ gem install pkg/gnista-0.0.5.gem -- --with-gnista-lib=/usr/local/brew/lib --with-gnista-include=/usr/local/brew/include
62
+ ```
63
+
64
+ ### Hammerstore
65
+
66
+ Now install hammerstore itself:
67
+
25
68
  gem install hammerstore
26
69
 
27
70
  ## License
data/Rakefile CHANGED
@@ -2,11 +2,6 @@ require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
3
  require 'rubocop/rake_task'
4
4
 
5
- desc 'Update bundle'
6
- task :bundle do
7
- `bundle update`
8
- end
9
-
10
5
  desc 'Run tests'
11
6
  RSpec::Core::RakeTask.new(:spec)
12
7
 
@@ -16,10 +11,4 @@ Rubocop::RakeTask.new(:rubocop) do |task|
16
11
  task.fail_on_error = true
17
12
  end
18
13
 
19
- desc 'Run travis-lint on .travis.yml'
20
- task :travislint do
21
- print 'There is an issue with your .travis.yml' unless system('travis-lint')
22
- end
23
-
24
- task default: [:spec, :travislint, :rubocop, :build, :install]
25
- task release: [:bundle]
14
+ task default: [:spec, :rubocop, :build, :install]
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'hammerstore'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = Time.now.strftime("%Y-%m-%d")
5
5
 
6
6
  s.summary = 'Hammerspace backend for BasicCache'
@@ -13,13 +13,12 @@ Gem::Specification.new do |s|
13
13
  s.files = `git ls-files`.split
14
14
  s.test_files = `git ls-files spec/*`.split
15
15
 
16
- s.add_dependency 'basiccache'
17
- s.add_dependency 'hammerspace'
16
+ s.add_dependency 'basiccache', '~> 0.1.0'
17
+ s.add_dependency 'hammerspace', '~> 0.1.2'
18
18
 
19
- s.add_development_dependency 'rubocop'
20
- s.add_development_dependency 'travis-lint'
21
- s.add_development_dependency 'rake'
22
- s.add_development_dependency 'coveralls'
23
- s.add_development_dependency 'rspec'
24
- s.add_development_dependency 'fuubar'
19
+ s.add_development_dependency 'rubocop', '~> 0.22.0'
20
+ s.add_development_dependency 'rake', '~> 10.3.0'
21
+ s.add_development_dependency 'coveralls', '~> 0.7.0'
22
+ s.add_development_dependency 'rspec', '~> 2.14.1'
23
+ s.add_development_dependency 'fuubar', '~> 1.3.2'
25
24
  end
@@ -15,13 +15,14 @@ module HammerStore
15
15
  ##
16
16
  # Hammerspace-backed store object
17
17
  class Store
18
- attr_reader :raw
18
+ attr_reader :raw, :file
19
19
 
20
20
  ##
21
21
  # Generate an empty store
22
22
 
23
- def initialize(file)
24
- @raw = Hammerspace.new(file)
23
+ def initialize(params = {})
24
+ @file = params[:file] || fail('You must specify a file')
25
+ @raw = Hammerspace.new(@file)
25
26
  end
26
27
 
27
28
  ##
@@ -4,7 +4,7 @@ require 'set'
4
4
  describe HammerStore do
5
5
  describe '#new' do
6
6
  it 'creates store objects' do
7
- test = HammerStore.new 'teststore'
7
+ test = HammerStore.new file: 'teststore'
8
8
  expect(test).to be_an_instance_of HammerStore::Store
9
9
  end
10
10
  end
@@ -12,7 +12,7 @@ describe HammerStore do
12
12
  describe HammerStore::Store do
13
13
  let(:keys) { [1, 2, 3, 4, 5, :foo, 'foo'].to_set }
14
14
  let(:store) do
15
- store = HammerStore::Store.new 'teststore'
15
+ store = HammerStore::Store.new file: 'teststore'
16
16
  store.clear!
17
17
  (1..5).each { |i| store[i] = i + 5 }
18
18
  store[:foo] = :bar
metadata CHANGED
@@ -1,127 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammerstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: basiccache
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 0.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 0.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: hammerspace
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.1.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.1.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 0.22.0
48
48
  type: :development
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'
55
- - !ruby/object:Gem::Dependency
56
- name: travis-lint
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
54
+ version: 0.22.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rake
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ">="
59
+ - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '0'
61
+ version: 10.3.0
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ">="
66
+ - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: 10.3.0
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: coveralls
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - ">="
73
+ - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '0'
75
+ version: 0.7.0
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - ">="
80
+ - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '0'
82
+ version: 0.7.0
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: rspec
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - ">="
87
+ - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: '0'
89
+ version: 2.14.1
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - ">="
94
+ - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: '0'
96
+ version: 2.14.1
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: fuubar
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - ">="
101
+ - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '0'
103
+ version: 1.3.2
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ">="
108
+ - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: '0'
110
+ version: 1.3.2
125
111
  description: Stores cached values in Hammerspace
126
112
  email: me@lesaker.org
127
113
  executables: []