url_store 0.3.2 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -2
- data/Gemfile.lock +6 -6
- data/Rakefile +16 -13
- data/lib/url_store/generators/templates/initializer.erb +2 -1
- data/lib/url_store/railtie.rb +0 -1
- data/lib/url_store/version.rb +3 -0
- data/lib/url_store.rb +1 -2
- data/spec/url_store/compact_encoder_spec.rb +1 -1
- data/spec/url_store_spec.rb +3 -2
- data/url_store.gemspec +9 -47
- metadata +28 -45
- data/VERSION +0 -1
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
url_store (0.3.4)
|
5
|
+
|
1
6
|
GEM
|
2
7
|
remote: http://rubygems.org/
|
3
8
|
specs:
|
4
9
|
diff-lcs (1.1.2)
|
5
|
-
git (1.2.5)
|
6
|
-
jeweler (1.5.2)
|
7
|
-
bundler (~> 1.0.0)
|
8
|
-
git (>= 1.2.5)
|
9
|
-
rake
|
10
10
|
rake (0.8.7)
|
11
11
|
rspec (2.5.0)
|
12
12
|
rspec-core (~> 2.5.0)
|
@@ -21,6 +21,6 @@ PLATFORMS
|
|
21
21
|
ruby
|
22
22
|
|
23
23
|
DEPENDENCIES
|
24
|
-
jeweler
|
25
24
|
rake
|
26
25
|
rspec (~> 2)
|
26
|
+
url_store!
|
data/Rakefile
CHANGED
@@ -1,19 +1,22 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
|
1
3
|
task :default do
|
2
4
|
sh "rspec spec/"
|
3
5
|
end
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
# extracted from https://github.com/grosser/project_template
|
8
|
+
rule /^version:bump:.*/ do |t|
|
9
|
+
sh "git status | grep 'nothing to commit'" # ensure we are not dirty
|
10
|
+
index = ['major', 'minor','patch'].index(t.name.split(':').last)
|
11
|
+
file = 'lib/url_store/version.rb'
|
12
|
+
|
13
|
+
version_file = File.read(file)
|
14
|
+
old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
|
15
|
+
version_parts[index] = version_parts[index].to_i + 1
|
16
|
+
version_parts[2] = 0 if index < 2 # remove patch for minor
|
17
|
+
version_parts[1] = 0 if index < 1 # remove minor for major
|
18
|
+
new_version = version_parts * '.'
|
19
|
+
File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
|
15
20
|
|
16
|
-
|
17
|
-
rescue LoadError
|
18
|
-
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
|
21
|
+
sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
|
19
22
|
end
|
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
<% generator = (defined?(SecureRandom) ? SecureRandom : ActiveSupport::SecureRandom) -%>
|
2
|
+
UrlStore.defaults = {:secret => '<%= generator.hex(16) %>'}
|
data/lib/url_store/railtie.rb
CHANGED
data/lib/url_store.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
+
require 'url_store/version'
|
1
2
|
require 'url_store/compact_encoder'
|
2
|
-
|
3
3
|
require 'url_store/railtie' if defined?(::Rails) && ::Rails::VERSION::MAJOR >= 3
|
4
4
|
|
5
5
|
class UrlStore
|
6
|
-
VERSION = File.read( File.join(File.dirname(__FILE__),'..','VERSION') ).strip
|
7
6
|
SECRET = 'asdkasjlwqjdqaccxnjkasdfh2313'
|
8
7
|
|
9
8
|
# (convert to base64url <-> RFC4648) and '|'
|
data/spec/url_store_spec.rb
CHANGED
data/url_store.gemspec
CHANGED
@@ -1,50 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#
|
4
|
-
# -*- encoding: utf-8 -*-
|
1
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
name = "url_store"
|
3
|
+
require "#{name}/version"
|
5
4
|
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.
|
8
|
-
s.version = "0.3.2"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
5
|
+
Gem::Specification.new name, UrlStore::VERSION do |s|
|
6
|
+
s.summary = "Data securely stored in urls."
|
11
7
|
s.authors = ["Michael Grosser"]
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
"Gemfile",
|
17
|
-
"Gemfile.lock",
|
18
|
-
"Rakefile",
|
19
|
-
"Readme.md",
|
20
|
-
"VERSION",
|
21
|
-
"lib/url_store.rb",
|
22
|
-
"lib/url_store/compact_encoder.rb",
|
23
|
-
"lib/url_store/generators/initializer.rb",
|
24
|
-
"lib/url_store/generators/templates/initializer.erb",
|
25
|
-
"lib/url_store/railtie.rb",
|
26
|
-
"spec/spec_helper.rb",
|
27
|
-
"spec/url_store/compact_encoder_spec.rb",
|
28
|
-
"spec/url_store_spec.rb",
|
29
|
-
"url_store.gemspec"
|
30
|
-
]
|
31
|
-
s.homepage = %q{http://github.com/grosser/url_store}
|
32
|
-
s.require_paths = ["lib"]
|
33
|
-
s.rubygems_version = %q{1.6.2}
|
34
|
-
s.summary = %q{Data securely stored in urls.}
|
35
|
-
s.test_files = [
|
36
|
-
"spec/spec_helper.rb",
|
37
|
-
"spec/url_store/compact_encoder_spec.rb",
|
38
|
-
"spec/url_store_spec.rb"
|
39
|
-
]
|
40
|
-
|
41
|
-
if s.respond_to? :specification_version then
|
42
|
-
s.specification_version = 3
|
43
|
-
|
44
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
45
|
-
else
|
46
|
-
end
|
47
|
-
else
|
48
|
-
end
|
8
|
+
s.email = "michael@grosser.it"
|
9
|
+
s.homepage = "http://github.com/grosser/#{name}"
|
10
|
+
s.files = `git ls-files`.split("\n")
|
11
|
+
s.license = "MIT"
|
49
12
|
end
|
50
|
-
|
metadata
CHANGED
@@ -1,82 +1,65 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: url_store
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 3
|
9
|
-
- 2
|
10
|
-
version: 0.3.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Michael Grosser
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2011-05-28 00:00:00 +02:00
|
19
|
-
default_executable:
|
12
|
+
date: 2012-04-29 00:00:00.000000000 Z
|
20
13
|
dependencies: []
|
21
|
-
|
22
|
-
|
23
|
-
email: grosser.michael@gmail.com
|
14
|
+
description:
|
15
|
+
email: michael@grosser.it
|
24
16
|
executables: []
|
25
|
-
|
26
17
|
extensions: []
|
27
|
-
|
28
18
|
extra_rdoc_files: []
|
29
|
-
|
30
|
-
files:
|
19
|
+
files:
|
31
20
|
- Gemfile
|
32
21
|
- Gemfile.lock
|
33
22
|
- Rakefile
|
34
23
|
- Readme.md
|
35
|
-
- VERSION
|
36
24
|
- lib/url_store.rb
|
37
25
|
- lib/url_store/compact_encoder.rb
|
38
26
|
- lib/url_store/generators/initializer.rb
|
39
27
|
- lib/url_store/generators/templates/initializer.erb
|
40
28
|
- lib/url_store/railtie.rb
|
29
|
+
- lib/url_store/version.rb
|
41
30
|
- spec/spec_helper.rb
|
42
31
|
- spec/url_store/compact_encoder_spec.rb
|
43
32
|
- spec/url_store_spec.rb
|
44
33
|
- url_store.gemspec
|
45
|
-
has_rdoc: true
|
46
34
|
homepage: http://github.com/grosser/url_store
|
47
|
-
licenses:
|
48
|
-
|
35
|
+
licenses:
|
36
|
+
- MIT
|
49
37
|
post_install_message:
|
50
38
|
rdoc_options: []
|
51
|
-
|
52
|
-
require_paths:
|
39
|
+
require_paths:
|
53
40
|
- lib
|
54
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
55
42
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
segments:
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
segments:
|
61
48
|
- 0
|
62
|
-
|
63
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
hash: 903047678128005122
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
51
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
|
69
|
-
segments:
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
segments:
|
70
57
|
- 0
|
71
|
-
|
58
|
+
hash: 903047678128005122
|
72
59
|
requirements: []
|
73
|
-
|
74
60
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.
|
61
|
+
rubygems_version: 1.8.24
|
76
62
|
signing_key:
|
77
63
|
specification_version: 3
|
78
64
|
summary: Data securely stored in urls.
|
79
|
-
test_files:
|
80
|
-
- spec/spec_helper.rb
|
81
|
-
- spec/url_store/compact_encoder_spec.rb
|
82
|
-
- spec/url_store_spec.rb
|
65
|
+
test_files: []
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.3.2
|