quandl 0.2.25 → 0.2.26
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 +8 -8
- data/Rakefile +8 -8
- data/UPGRADE.md +9 -1
- data/config/locales/en.yml +4 -0
- data/dist/resources/ruby/PackageInfo +1 -1
- data/lib/quandl/command/qconfig.rb +19 -10
- data/lib/quandl/command/tasks/base.rb +5 -1
- data/lib/quandl/command/tasks/delete.rb +41 -9
- data/lib/quandl/command/tasks/download.rb +0 -5
- data/lib/quandl/command/version.rb +1 -1
- data/scripts/win/quandl_toolbelt.iss +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTM2NzRlMjZiMjllYmI3ZTJiNjhkY2E4Y2MzMzU3NDU2MjYxNmI5Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjI3Y2NlYTU1MGQwYzUzMTAwMGIxNGUyZGI2ODQ2Y2Y5MWI1YzM1ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjA2YzZhNTk3MmU1MWRlYTdkYjQ5MTFmNmUwOTg1MmE0MDU5NDgwM2U5ZTI5
|
10
|
+
ZDY5ODAyZTM1YTM5ZDAwYjk3Y2JhZGI3YzEwNDJmYTY3N2I4MjUwNTY0MDdk
|
11
|
+
ZDJiOGQ4NjQ2NDRiMDkxY2QwNTRlN2M2MjY3ODIxNjdjNjhjYzk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWU1MjMzMzlhNmMyOTQ5YjI1YWI3Y2Y1NGFiNmE5OGU5N2ZjYTdmYzA1YzY2
|
14
|
+
YzBkM2NiYmY0OTUzYzljZTEwNGJlZGMyNWU4MDU0MzY2MGZhYjI2M2I0M2Ew
|
15
|
+
ZWEzYzYzZTk2NjMwMmY1ODkwZWU0NzBkNDQ1OGEwMzY0MTU3MTY=
|
data/Rakefile
CHANGED
@@ -46,14 +46,6 @@ def file_contains_matching(file_path, matching)
|
|
46
46
|
end
|
47
47
|
|
48
48
|
namespace :quandl do
|
49
|
-
desc "build and push gem & distros"
|
50
|
-
task :release do |t,args|
|
51
|
-
checkout_master!
|
52
|
-
# tag git revision with version, build quandl.gem, push to rubygems
|
53
|
-
Rake::Task["release"].execute
|
54
|
-
# build windows exe, mac pkg, tarball
|
55
|
-
Rake::Task["toolbelt:release:all"].execute
|
56
|
-
end
|
57
49
|
desc "bump version and generate UPGRADE documentation"
|
58
50
|
task :bump, :version do |t,args|
|
59
51
|
version = args['version']
|
@@ -63,6 +55,14 @@ namespace :quandl do
|
|
63
55
|
Rake::Task["quandl:generate:documentation"].execute args.to_hash.stringify_keys!
|
64
56
|
Rake::Task["quandl:version:bump"].execute args.to_hash.stringify_keys!
|
65
57
|
end
|
58
|
+
desc "build and push gem & distros"
|
59
|
+
task :release do |t,args|
|
60
|
+
checkout_master!
|
61
|
+
# tag git revision with version, build quandl.gem, push to rubygems
|
62
|
+
Rake::Task["release"].execute
|
63
|
+
# build windows exe, mac pkg, tarball
|
64
|
+
Rake::Task["toolbelt:release:all"].execute
|
65
|
+
end
|
66
66
|
namespace :version do
|
67
67
|
task :bump, :version do |t,args|
|
68
68
|
version_file = 'lib/quandl/command/version.rb'
|
data/UPGRADE.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
-
## 0.2.
|
1
|
+
## 0.2.26
|
2
|
+
|
3
|
+
* QUGC-90 fix quandl login barfs on linux
|
4
|
+
* QUGC-96 fix toolbelt failing to run due to missing config
|
5
|
+
* QUGC-95 rename ruby package identifier to avoid clobbering other ruby packages
|
6
|
+
|
2
7
|
|
3
8
|
|
9
|
+
## 0.2.25
|
10
|
+
|
11
|
+
* info outputs install path when given verbose
|
4
12
|
|
5
13
|
|
6
14
|
|
data/config/locales/en.yml
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
<pkg-info format-version="2" identifier="org.ruby-lang.installer" version="1.9.3-p448" install-location="/usr/local/quandl/ruby" auth="root">
|
1
|
+
<pkg-info format-version="2" identifier="org.quandl.ruby-lang.installer" version="1.9.3-p448" install-location="/usr/local/quandl/ruby" auth="root">
|
2
2
|
<payload installKBytes="78196" numberOfFiles="16186"/>
|
3
3
|
</pkg-info>
|
@@ -12,18 +12,12 @@ class QConfig
|
|
12
12
|
@configuration ||= self.new( config_file: config_file )
|
13
13
|
end
|
14
14
|
|
15
|
-
def convert_legacy_config
|
16
|
-
return if File.directory?(root_path)
|
17
|
-
# otherwise move the old .quandl into .quandl/config
|
18
|
-
FileUtils.mv(root_path, "#{root_path}.old")
|
19
|
-
FileUtils.mkdir(root_path)
|
20
|
-
token = File.read("#{root_path}.old")
|
21
|
-
File.write(config_file, "token: #{token}")
|
22
|
-
end
|
23
|
-
|
24
15
|
def config_file
|
16
|
+
return @config_file if defined?(@config_file)
|
17
|
+
@config_file = File.join(root_path, 'config')
|
25
18
|
convert_legacy_config
|
26
|
-
|
19
|
+
ensure_directory_is_present
|
20
|
+
@config_file
|
27
21
|
end
|
28
22
|
|
29
23
|
def root_path
|
@@ -32,6 +26,21 @@ class QConfig
|
|
32
26
|
|
33
27
|
protected
|
34
28
|
|
29
|
+
def ensure_directory_is_present
|
30
|
+
return if File.exists?(config_file)
|
31
|
+
FileUtils.mkdir(root_path) unless Dir.exists?(root_path)
|
32
|
+
File.write( config_file, YAML.dump({}) )
|
33
|
+
end
|
34
|
+
|
35
|
+
def convert_legacy_config
|
36
|
+
return if File.directory?(root_path) || !File.exists?(root_path)
|
37
|
+
# otherwise move the old .quandl into .quandl/config
|
38
|
+
FileUtils.mv(root_path, "#{root_path}.old")
|
39
|
+
FileUtils.mkdir(root_path)
|
40
|
+
token = File.read("#{root_path}.old")
|
41
|
+
File.write(config_file, "token: #{token}")
|
42
|
+
end
|
43
|
+
|
35
44
|
def define_attributes(*attr_names)
|
36
45
|
attr_names.each do |attr_name|
|
37
46
|
define_attribute(attr_name)
|
@@ -1,4 +1,8 @@
|
|
1
1
|
require 'active_model'
|
2
|
+
require 'quandl/pattern'
|
3
|
+
require 'quandl/pattern/client'
|
4
|
+
require 'quandl/operation'
|
5
|
+
require 'quandl/operation'
|
2
6
|
|
3
7
|
module Quandl
|
4
8
|
module Command
|
@@ -74,7 +78,7 @@ class Base
|
|
74
78
|
def t(key)
|
75
79
|
key = key.to_s
|
76
80
|
translation = lang
|
77
|
-
key.split('.').each{|m| translation = translation.send(m) }
|
81
|
+
key.split('.').each{|m| translation = translation.respond_to?(m) ? translation.send(m) : nil }
|
78
82
|
translation
|
79
83
|
end
|
80
84
|
|
@@ -1,11 +1,31 @@
|
|
1
1
|
class Quandl::Command::Tasks::Delete < Quandl::Command::Tasks::Base
|
2
|
+
|
2
3
|
autoload_client_library
|
4
|
+
authenticated_users_only!
|
3
5
|
|
4
|
-
syntax "quandl #{command_name} (SOURCE_CODE/)CODE"
|
5
6
|
description "Delete a dataset by its quandl code."
|
6
|
-
|
7
|
-
|
7
|
+
syntax %Q{quandl delete (SOURCE_CODE/)CODE
|
8
|
+
|
9
|
+
Examples:
|
10
|
+
|
11
|
+
$ quandl delete TEST
|
12
|
+
Are you sure? (y/n)
|
13
|
+
|
14
|
+
$ quandl delete TEST TEST2 TEST3 --force-yes
|
15
|
+
Deleted | 164ms | TEST
|
16
|
+
Deleted | 134ms | TEST2
|
17
|
+
Deleted | 124ms | TEST3
|
18
|
+
|
19
|
+
$ quandl list --match TEST | quandl delete --force-yes
|
8
20
|
|
21
|
+
$ cat ids.txt | quandl delete --force-yes}
|
22
|
+
|
23
|
+
options({
|
24
|
+
Integer => {
|
25
|
+
threads: t('options.threads'),
|
26
|
+
}
|
27
|
+
})
|
28
|
+
|
9
29
|
def execute
|
10
30
|
# download using arguments when present
|
11
31
|
return delete_each_argument if args.first.present?
|
@@ -14,20 +34,32 @@ class Quandl::Command::Tasks::Delete < Quandl::Command::Tasks::Base
|
|
14
34
|
end
|
15
35
|
|
16
36
|
def delete_each_argument
|
17
|
-
|
18
|
-
|
19
|
-
|
37
|
+
# delete each arg
|
38
|
+
args.each{|code| delete_with_pool(code) }
|
39
|
+
# wait for all deletes to finish
|
20
40
|
pool.shutdown
|
21
41
|
end
|
22
42
|
|
23
43
|
def delete_each_stdin
|
24
44
|
return error("Cannot delete datasets from STDIN unless --force-yes is set!") unless force_yes?
|
25
|
-
|
26
|
-
|
27
|
-
|
45
|
+
# treat each line from stdin as a code
|
46
|
+
$stdin.each_line{|code| delete_with_pool(code) }
|
47
|
+
# wait for deletes to finish
|
28
48
|
pool.shutdown
|
29
49
|
end
|
30
50
|
|
51
|
+
def delete_with_pool(code)
|
52
|
+
# sanitize
|
53
|
+
code = code.to_s.strip.rstrip
|
54
|
+
# if --force-yes send the deletes async
|
55
|
+
if force_yes?
|
56
|
+
pool.process{ delete( code ) }
|
57
|
+
# otherwise send each delete sync and wait for confirmation
|
58
|
+
else
|
59
|
+
delete( code )
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
31
63
|
def delete(code)
|
32
64
|
return error("You must provide a code!") if code.blank?
|
33
65
|
# find by code
|
@@ -34,6 +34,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
|
|
34
34
|
Source: "..\..\build\tarball\installer\rubyinstaller.exe"; DestDir: "{tmp}";
|
35
35
|
Source: "..\..\build\tarball\quandl-command\bin\*.*"; DestDir: "{app}\bin"; Flags: recursesubdirs;
|
36
36
|
Source: "..\..\build\tarball\quandl-command\lib\*.*"; DestDir: "{app}\lib"; Flags: recursesubdirs;
|
37
|
+
Source: "..\..\build\tarball\quandl-command\config\*.*"; DestDir: "{app}\config"; Flags: recursesubdirs;
|
37
38
|
Source: "..\..\build\tarball\quandl-command\vendor\*.*"; DestDir: "{app}\vendor"; Flags: recursesubdirs;
|
38
39
|
Source: "..\..\build\tarball\quandl\quandl.bat"; DestDir: "{app}\bin"; Flags: recursesubdirs;
|
39
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Hilscher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|