fix_symbol 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +2 -2
- data/lib/fix_symbol/base.rb +6 -1
- data/lib/fix_symbol/version.rb +1 -1
- metadata +3 -9
- data/LICENSE.txt~ +0 -18
- data/fix_symbol.gemspec~ +0 -23
- data/test/t2.yml~ +0 -2
- data/test/tokens.yml~ +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19c4b050cc06ee1c69c2f5a068d941120fc56505
|
4
|
+
data.tar.gz: c41d97241f6a6536c554aad4f585768233a46f13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a753d45e9da3f5bd3893cb21228174a5fbc8382796642d1ca6044de3588651bc686047d5ce6017c1447efef1114765a81b546f48865e6d24e24f2ca58e34de43
|
7
|
+
data.tar.gz: a44596c4e42d5937abc2fe85a6432a2742cda1b31fac122461ae530afba01a7d8d6c04052689f93ac793f219695ea505c68bae8641492d272c63eafda723cc23
|
data/README.rdoc
CHANGED
@@ -11,8 +11,8 @@ it to be useful to anybody that needs/likes the idea.
|
|
11
11
|
== Usage
|
12
12
|
|
13
13
|
class MyFixSymbol < FixSymbol::Base
|
14
|
-
|
15
|
-
|
14
|
+
@@use = :yml
|
15
|
+
@@file = File.dirname(__FILE__) + '/tokens.yml'
|
16
16
|
end
|
17
17
|
|
18
18
|
At the moment, only yml importation is available. Therefore @@use = :yml is kind of redundant and will be taken care of in the following version. Furthermore, as compatibility with more data structures will be developed, it will be a great idea to inherit from FixSymbol::Yml (which will inherit from ::Base).
|
data/lib/fix_symbol/base.rb
CHANGED
@@ -102,7 +102,12 @@ module FixSymbol
|
|
102
102
|
if @@use == :yml
|
103
103
|
if File.exists? @@file
|
104
104
|
data = YAML.load_file(@@file)
|
105
|
-
|
105
|
+
begin
|
106
|
+
token = data[id].to_sym unless data == nil
|
107
|
+
rescue
|
108
|
+
token = :notfound
|
109
|
+
puts "Token #{id} not found."
|
110
|
+
end
|
106
111
|
else
|
107
112
|
raise 'No file found.'
|
108
113
|
end
|
data/lib/fix_symbol/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fix_symbol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -49,18 +49,14 @@ files:
|
|
49
49
|
- Gemfile
|
50
50
|
- LICENSE-GPL
|
51
51
|
- LICENSE.txt
|
52
|
-
- LICENSE.txt~
|
53
52
|
- README.rdoc
|
54
53
|
- Rakefile
|
55
54
|
- fix_symbol.gemspec
|
56
|
-
- fix_symbol.gemspec~
|
57
55
|
- lib/fix_symbol.rb
|
58
56
|
- lib/fix_symbol/base.rb
|
59
57
|
- lib/fix_symbol/version.rb
|
60
58
|
- test/simpletest.rb
|
61
|
-
- test/t2.yml~
|
62
59
|
- test/tokens.yml
|
63
|
-
- test/tokens.yml~
|
64
60
|
homepage: https://github.com/Sikian/fix_symbol
|
65
61
|
licenses:
|
66
62
|
- GPL-3.0
|
@@ -81,13 +77,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
77
|
version: '0'
|
82
78
|
requirements: []
|
83
79
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.0.
|
80
|
+
rubygems_version: 2.0.7
|
85
81
|
signing_key:
|
86
82
|
specification_version: 4
|
87
83
|
summary: A simple gem to allow symbols with fix id throughout different instances.
|
88
84
|
test_files:
|
89
85
|
- test/simpletest.rb
|
90
|
-
- test/t2.yml~
|
91
86
|
- test/tokens.yml
|
92
|
-
- test/tokens.yml~
|
93
87
|
has_rdoc:
|
data/LICENSE.txt~
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
FixSymbol
|
2
|
-
A modular query builder to enable a high database compatibility, usage easiness and dynamic construction.
|
3
|
-
Copyright (C) 2013 FixSymbol contributers
|
4
|
-
|
5
|
-
This program is free software: you can redistribute it and/or modify
|
6
|
-
it under the terms of the GNU General Public License as published by
|
7
|
-
the Free Software Foundation, either version 3 of the License, or
|
8
|
-
(at your option) any later version.
|
9
|
-
|
10
|
-
This program is distributed in the hope that it will be useful,
|
11
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
-
GNU General Public License for more details.
|
14
|
-
|
15
|
-
You should have received a copy of the GNU General Public License
|
16
|
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
-
|
18
|
-
In order to contact the author of this gem, please write to sikian@gmail.com.
|
data/fix_symbol.gemspec~
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'fix_symbol/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "fix_symbol"
|
8
|
-
spec.version = FixSymbol::VERSION
|
9
|
-
spec.authors = ["Sikian"]
|
10
|
-
spec.email = ["sikian@gmail.com"]
|
11
|
-
spec.description = %q{A simple gem to allow symbols with fix id throughout different instances.}
|
12
|
-
spec.summary = %q{A simple gem to allow symbols with fix id throughout different instances.}
|
13
|
-
spec.homepage = ""
|
14
|
-
spec.license = "GPL-3.0"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
-
end
|
data/test/t2.yml~
DELETED