quandl 0.2.22 → 0.2.24

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzJlZmNhNmQ0NWI4MTFlYTEyYjkxZDk1NTM0YTUxMWJlZDBlNzdkZg==
4
+ Y2VkNWZhMDcwM2MwMTg4YTExOTVlYzgyN2VhZmFiMTY1MmExMjYyMg==
5
5
  data.tar.gz: !binary |-
6
- ZGVmYmQ2YzZiZWFmNGRkNjM2YjBiYmVjMTA1MTdjMTZlMGFhNzY2ZQ==
6
+ MDVkNDQ2NWYyMGM3YzUyMGJjMjI5Yjg2ZTE5ZTQ2NGI4NzNlY2I2Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OGY2YmY4Njk4MGU1ZjQ1ODIzOWIyN2RlYjFiZTZjZjY1MjRjZDg3YWVmNzNm
10
- NDJhNzk3OTY3MTJkZDRlMjJmYTJhNzRlN2Q5NjU3YTNlYjRlYjRhNzIwZDVh
11
- ODExM2YwMGU5YzBiZDNiNjU2MDE3NzE5Y2MxOTc3YmNlZGIxMmE=
9
+ MTJhZDg4ZTlmMWQwYzQ4YjU5Zjk2YzJmNjA2ZTQyZWZlMjQ4NzA4MzhkOWQy
10
+ MDk2ZmNhYTI0ZGMwODUxNWM0MWI2ZTViYTIwYmQ3YTQ2YWFjOTgzOTUxNmU3
11
+ MTczNWMyNDY4ZTMzZmRkNjRiNDA1YjFmY2E1MTQ3NGZhMzQxZmI=
12
12
  data.tar.gz: !binary |-
13
- YzU4MzFiNDI5ZjNmNGY5M2JjZjYxMzEzZTI2YTkwODJmZTVjZjdlYTdmN2Mx
14
- YWQ5YzdjZmJjNTFiYjU3YjI2NWQxOGUxMjRlMjI5ZTY5MDEwNjE2MzcwZTAz
15
- NWY5MjE0ODUzNzBlYWZhODNlM2Y1NDU2MGY5OWFlYzY5NGYwM2E=
13
+ YzBhMGFmZWZhYTA0NGU1MTJkZTU3ZjlhMGMyYTUwZmUwZmRhZTJiYmRiOWUz
14
+ NTI5OGYxNWZlZTc1NzgzZDc3NWI5OGUwMGIzMDQzZWIwM2M1YmU2MDY0NmI0
15
+ MGUyNzUxMGY5N2JiZDIzZGQyMTk2YWJlOGQ5N2YwMjU3NjMzNDA=
data/Rakefile CHANGED
@@ -12,11 +12,82 @@ Dir[File.expand_path("../tasks/*.rake", __FILE__)].each do |task|
12
12
  load task
13
13
  end
14
14
 
15
+ task :console do |t,args|
16
+ binding.pry
17
+ end
18
+
15
19
  desc "Run all specs"
16
20
  RSpec::Core::RakeTask.new(:spec) do |task|
17
21
  task.pattern = "spec/**/*_spec.rb"
18
22
  end
19
23
 
24
+ def checkout_master!
25
+ raise "You have unstaged commits." if %x{git status} =~ /Changes not staged for commit/
26
+ sh "git checkout master"
27
+ raise "Unable to checkout master" unless %x{git branch | grep '*'} =~ /master/
28
+ end
29
+
30
+ def verify_version!(version)
31
+ raise ArgumentError, "Expected version format is: MAJOR.MINOR.PATCH, got: #{version}" unless version =~ /[0-9]+\.[0-9]+\.[0-9]+/
32
+ raise "Version '#{version}' has already been documented in UPGRADE.md" if file_contains_matching("UPGRADE.md", /## #{version}/)
33
+ end
34
+
35
+ def file_contains_matching(file_path, matching)
36
+ matched = false
37
+ f = File.open(file_path)
38
+ f.each_line do |line|
39
+ if line =~ matching
40
+ matched = true
41
+ break
42
+ end
43
+ end
44
+ f.close
45
+ matched
46
+ end
47
+
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
+ desc "bump version and generate UPGRADE documentation"
58
+ task :bump, :version do |t,args|
59
+ version = args['version']
60
+ checkout_master!
61
+ verify_version!(version)
62
+ # update UPGRADE.md with commits
63
+ Rake::Task["quandl:generate:documentation"].execute args.to_hash.stringify_keys!
64
+ Rake::Task["quandl:version:bump"].execute args.to_hash.stringify_keys!
65
+ end
66
+ namespace :version do
67
+ task :bump, :version do |t,args|
68
+ version_file = 'lib/quandl/command/version.rb'
69
+ IO.write(version_file, File.open(version_file) do |f|
70
+ f.read.gsub(Quandl::Command::VERSION, args['version'])
71
+ end
72
+ )
73
+ sh(%Q{git commit -am "Bump version to: #{args['version']}"})
74
+ end
75
+ end
76
+ namespace :generate do
77
+ task :documentation, :version do |t,args|
78
+ version = args['version']
79
+ verify_version!(version)
80
+ # collect commits that match JIRA syntax
81
+ commits = %x{ git --no-pager log --since="v#{Quandl::Command::VERSION}" --pretty=oneline --grep='^QUGC' }
82
+ # split newlines and exclude reference, select uniq
83
+ commits = commits.split("\n").collect{|c| "* #{c[41..-1]}" }.uniq
84
+ # compose prepend string
85
+ commits = "## #{version} \n\n" + commits.join("\n") + "\n\n\n\n"
86
+ # prepend to UPGRADE.md
87
+ File.write( 'UPGRADE.md', commits + File.read('UPGRADE.md') )
88
+ end
89
+ end
90
+ end
20
91
 
21
92
  namespace :rubies do
22
93
 
data/UPGRADE.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.2.24
2
+
3
+ * QUGC-87 quandl update, quandl uninstall need to be disabled unless installed through a package
4
+ * QUGC-86 rake quandl:release will only create releases from master
5
+ * QUGC-86 add rake quandl:release that: Generate documentation, bump version, build and push distros
6
+ * QUGC-86 added: rake quandl:document:release
7
+ * QUGC-84 rename quandl_command to quandl
8
+
9
+
10
+
1
11
  ## 0.2.22
2
12
 
3
13
  * update permits adding new folders
data/bin/quandl CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: UTF-8
3
-
4
3
  require "pathname"
5
4
  bin_file = Pathname.new(__FILE__).realpath
6
5
 
@@ -0,0 +1,22 @@
1
+ quandl:
2
+ command:
3
+ tasks:
4
+ download:
5
+ options:
6
+ order: "Return rows in either ASC or DESC order"
7
+ transform: "Transform data using one of: diff, rdiff, cumul, normalize, rdiff_from"
8
+ collapse: "Collapse data to one of: daily, weekly, monthly, quarterly, annual"
9
+ trim_start: "Exclude rows that are older than trim_start"
10
+ trim_end: "Exclude rows that are newer than trim_end"
11
+ threads: "How many workers to use during download."
12
+ limit: "Limit the number of rows returned"
13
+ column: "Pluck a specific column by index"
14
+ row: "Pluck a specific row by index"
15
+ offset: "Offset the start of the rows"
16
+
17
+ validations:
18
+ trim_start: "is invalid. Expected format: yyyy-mm-dd"
19
+ trim_end: "is invalid. Expected format: yyyy-mm-dd"
20
+ order: "must be one of: asc, desc"
21
+ collapse: "must be one of: daily, weekly, monthly, quarterly, annual"
22
+ transform: "must be one of: diff, rdiff, cumul, normalize, rdiff_from"
@@ -1,5 +1,6 @@
1
1
  require 'fileutils'
2
2
  require 'yaml'
3
+ require 'ostruct'
3
4
 
4
5
  module Quandl
5
6
  module Command
@@ -1,4 +1,4 @@
1
- autoload :OpenURI, 'open-uri'
1
+ require 'active_model'
2
2
 
3
3
  module Quandl
4
4
  module Command
@@ -7,6 +7,10 @@ module Tasks
7
7
  class Base
8
8
  class << self
9
9
 
10
+ def inherited(klass)
11
+ Tasks.tasks << klass unless Tasks.tasks.include?(klass)
12
+ end
13
+
10
14
  def configure(app)
11
15
  return if disabled?
12
16
  app.command(command_name) do |c|
@@ -44,11 +48,19 @@ class Base
44
48
  @options = value if value.present?
45
49
  @options ||= {}
46
50
  end
51
+
52
+ def autoload_client_library
53
+ before_execute :configure_client
54
+ end
47
55
 
48
56
  def authenticated_users_only!
49
57
  before_execute :authenticated_users_only!
50
58
  end
51
59
 
60
+ def disable_in_gem!
61
+ before_execute :disable_in_gem!
62
+ end
63
+
52
64
  def warn_unauthenticated_users
53
65
  before_execute :warn_unauthenticated_users
54
66
  end
@@ -59,6 +71,22 @@ class Base
59
71
  self.new( args, options ).call
60
72
  end
61
73
 
74
+ def t(key)
75
+ key = key.to_s
76
+ translation = lang
77
+ key.split('.').each{|m| translation = translation.send(m) }
78
+ translation
79
+ end
80
+
81
+ def lang
82
+ @lang ||= Quandl::Lang.send(language).quandl.command.tasks.send(command_name)
83
+ end
84
+
85
+ def language
86
+ # stub
87
+ 'en'
88
+ end
89
+
62
90
  protected
63
91
 
64
92
  def ensure_options_are_command_options!(options)
@@ -83,7 +111,7 @@ class Base
83
111
  extend ActiveModel::Callbacks
84
112
  define_model_callbacks :execute
85
113
 
86
- before_execute :configure_client, :raise_error_unless_valid!, :check_for_update, :start_request_timer
114
+ before_execute :raise_error_unless_valid!, :check_for_update, :start_request_timer
87
115
  after_execute :log_request_time
88
116
 
89
117
  def call
@@ -187,6 +215,13 @@ class Base
187
215
  end
188
216
  end
189
217
 
218
+ def disable_in_gem!
219
+ if Dir.exists?( File.join( Tasks.root, ".git") ) || File.exists?( File.join( Tasks.root, "Gemfile") )
220
+ fatal("#{self.class.command_name} is only permitted when installed as a package! http://quandl.com/help/toolbelt")
221
+ false
222
+ end
223
+ end
224
+
190
225
  def warn_unauthenticated_users
191
226
  error("WARN: Authenticate your requests! 'quandl login' OR --token xyz923") if auth_token.blank?
192
227
  end
@@ -199,8 +234,13 @@ class Base
199
234
  end
200
235
 
201
236
  def configure_client
237
+ require 'thread/pool'
238
+ require 'quandl/format'
239
+ require 'quandl/command/client_ext'
202
240
  Quandl::Client.use( quandl_url )
203
241
  Quandl::Client.token = auth_token
242
+ Quandl::Client.request_source = 'quandl_command'
243
+ Quandl::Client.request_version = Quandl::Command::VERSION
204
244
  end
205
245
 
206
246
  def check_for_update
@@ -215,6 +255,10 @@ class Base
215
255
  end
216
256
 
217
257
  def run_update_check
258
+ require 'uri'
259
+ require 'net/http'
260
+ require 'open-uri'
261
+
218
262
  print("# Checking for updates ... ")
219
263
 
220
264
  uri = URI.parse("https://raw.github.com/quandl/quandl_command/master/lib/quandl/command/version.rb")
@@ -1,4 +1,5 @@
1
1
  class Quandl::Command::Tasks::Delete < Quandl::Command::Tasks::Base
2
+ autoload_client_library
2
3
 
3
4
  syntax "quandl #{command_name} (SOURCE_CODE/)CODE"
4
5
  description "Delete a dataset by its quandl code."
@@ -1,32 +1,37 @@
1
- require 'thread/pool'
1
+ require 'quandl/pattern'
2
+ require 'quandl/pattern/client'
3
+ require 'quandl/operation'
4
+ require 'quandl/operation'
2
5
 
3
6
  class Quandl::Command::Tasks::Download < Quandl::Command::Tasks::Base
7
+ autoload_client_library
4
8
 
5
9
  syntax "quandl download (SOURCE_CODE/)CODE"
6
10
  description "Download a dataset using its quandl code."
11
+
12
+ warn_unauthenticated_users
13
+
7
14
  options({
8
15
  String => {
9
- order: "Return rows in either ASC or DESC order",
10
- transform: "Transform data using one of: #{Quandl::Operation::Transform.valid_transformations.join(', ')}",
11
- collapse: "Collapse data to one of: #{Quandl::Operation::Collapse.valid_collapses.join(', ')}",
12
- trim_start: "Exclude rows that are older than trim_start",
13
- trim_end: "Exclude rows that are newer than trim_end",
16
+ order: t('options.order'),
17
+ transform: t('options.transform'),
18
+ collapse: t('options.collapse'),
19
+ trim_start: t('options.trim_start'),
20
+ trim_end: t('options.trim_end'),
14
21
  },
15
22
  Integer => {
16
- threads: "How many workers to use during download.",
17
- limit: "Limit the number of rows returned",
18
- column: "Pluck a specific column by index",
19
- row: "Pluck a specific row by index",
20
- offset: "Offset the start of the rows",
23
+ threads: t('options.threads'),
24
+ limit: t('options.order'),
25
+ column: t('options.column'),
26
+ row: t('options.row'),
27
+ offset: t('options.offset'),
21
28
  }
22
29
  })
23
30
 
24
- warn_unauthenticated_users
25
-
26
- validates :trim_start, :trim_end, allow_nil: true, format: { with: Quandl::Pattern.dataset_date, message: "is invalid. Expected format: #{Quandl::Pattern.dataset_date.to_example}" }
27
- validates :order, allow_nil: true, inclusion: { in: ['asc', 'desc'], message: "must be one of: asc, desc" }
28
- validates :collapse, allow_nil: true, inclusion: { in: Quandl::Operation::Collapse.valid_collapses.collect(&:to_s), message: "is not included in the list: #{Quandl::Operation::Collapse.valid_collapses.join(", ")}" }
29
- validates :transform, allow_nil: true, inclusion: { in: Quandl::Operation::Transform.valid_transformations.collect(&:to_s), message: "is not included in the list: #{Quandl::Operation::Transform.valid_transformations.join(", ")}" }
31
+ validates :trim_start, :trim_end, allow_nil: true, format: { with: Quandl::Pattern.dataset_date, message: t('validations.trim_start') }
32
+ validates :order, allow_nil: true, inclusion: { in: ['asc', 'desc'], message: t('validations.order') }
33
+ validates :collapse, allow_nil: true, inclusion: { in: Quandl::Operation::Collapse.valid_collapses.collect(&:to_s), message: t('validations.collapse') }
34
+ validates :transform, allow_nil: true, inclusion: { in: Quandl::Operation::Transform.valid_transformations.collect(&:to_s), message: t('validations.transform') }
30
35
 
31
36
  def execute
32
37
  # download using arguments when present
@@ -1,4 +1,5 @@
1
1
  class Quandl::Command::Tasks::Info < Quandl::Command::Tasks::Base
2
+ autoload_client_library
2
3
 
3
4
  description "Display information about the Quandl Toolbelt."
4
5
 
@@ -1,4 +1,5 @@
1
1
  class Quandl::Command::Tasks::List < Quandl::Command::Tasks::Base
2
+ autoload_client_library
2
3
 
3
4
  description "List datasets matching conditions."
4
5
  options({
@@ -12,6 +13,7 @@ class Quandl::Command::Tasks::List < Quandl::Command::Tasks::Base
12
13
  }
13
14
  })
14
15
 
16
+
15
17
  authenticated_users_only!
16
18
 
17
19
  def execute
@@ -1,5 +1,6 @@
1
1
  class Quandl::Command::Tasks::Login < Quandl::Command::Tasks::Base
2
-
2
+ autoload_client_library
3
+
3
4
  description "Login to quandl with username and email."
4
5
 
5
6
  options String => { method: 'Login method? ( password | token )' }
@@ -0,0 +1,17 @@
1
+ class Quandl::Command::Tasks::Uninstall < Quandl::Command::Tasks::Base
2
+
3
+ # curl -s https://s3.amazonaws.com/quandl-command/install.sh | bash
4
+
5
+ description "Uninstall Quandl Toolbelt"
6
+ syntax "Uninstall Quandl Toolbelt"
7
+
8
+ disable_in_gem!
9
+
10
+ def execute
11
+ FileUtils.rm_rf( Quandl::Command.root )
12
+ info("Quandl Toolbelt was uninstalled successfully.")
13
+ rescue => err
14
+ error("Quandl Toolbelt failed to uninstall. Attempted to delete: #{Quandl::Command.root}\n#{err}")
15
+ end
16
+
17
+ end
@@ -17,6 +17,8 @@ class Quandl::Command::Tasks::Update < Quandl::Command::Tasks::Base
17
17
 
18
18
  PACKAGE_URL = 'http://s3.amazonaws.com/quandl-command/'
19
19
 
20
+ disable_in_gem!
21
+
20
22
  class << self
21
23
  def package_url(revision=nil)
22
24
  # are we on windows?
@@ -31,7 +33,6 @@ class Quandl::Command::Tasks::Update < Quandl::Command::Tasks::Base
31
33
  def execute
32
34
  # load libraries needed by this action
33
35
  require_dependencies
34
- return unless assert_update_requirements!
35
36
  info "Updating from #{Quandl::Command::VERSION} ... "
36
37
  # wipe update/ and backup/ folders
37
38
  prepare_for_update
@@ -91,16 +92,13 @@ class Quandl::Command::Tasks::Update < Quandl::Command::Tasks::Base
91
92
  private
92
93
 
93
94
  def require_dependencies
95
+ require 'uri'
96
+ require 'net/http'
94
97
  require 'quandl/utility/config'
95
98
  require 'zlib'
96
99
  require 'archive/tar/minitar'
97
100
  end
98
101
 
99
- def assert_update_requirements!
100
- return fatal("update is destructive and disabled in development!") if Dir.exists?(File.join(root_path, ".git"))
101
- true
102
- end
103
-
104
102
  def prepare_for_update
105
103
  [backup_path, update_path].each do |path|
106
104
  # remove previous directory if present
@@ -1,5 +1,6 @@
1
1
  class Quandl::Command::Tasks::Upload < Quandl::Command::Tasks::Base
2
-
2
+ autoload_client_library
3
+
3
4
  description "Upload a dataset using its quandl code."
4
5
  syntax %{quandl upload file.qdf
5
6
 
@@ -6,6 +6,14 @@ module Tasks
6
6
  @root ||= File.expand_path(File.join(File.dirname(__FILE__), '../../../'))
7
7
  end
8
8
 
9
+ def self.each(&block)
10
+ tasks.each{|t| block.call(t) }
11
+ end
12
+
13
+ def self.tasks
14
+ @tasks ||= []
15
+ end
16
+
9
17
  # require base task
10
18
  require 'quandl/command/tasks/base'
11
19
  # require tasks
@@ -1,5 +1,5 @@
1
1
  module Quandl
2
2
  module Command
3
- VERSION = '0.2.22'
3
+ VERSION = '0.2.24'
4
4
  end
5
5
  end
@@ -1,19 +1,19 @@
1
1
  require 'pry' if ENV['BUNDLE_LOCAL_GEMS']
2
2
 
3
+ module Quandl::Command
4
+ def self.root
5
+ @root ||= File.expand_path(File.join(File.dirname(__FILE__), '../../'))
6
+ end
7
+ end
8
+
9
+ require 'quandl/lang'
3
10
  require "quandl/command/version"
4
- require 'quandl/format'
5
11
  require 'quandl/command/qconfig'
6
12
  require 'quandl/command/tasks'
7
- require 'quandl/command/client_ext'
8
-
9
- # update tracking information
10
- Quandl::Client.request_source = 'quandl_command'
11
- Quandl::Client.request_version = Quandl::Command::VERSION
12
13
 
13
14
  Quandl::Logger.use(Quandl::Logger::Outputs)
14
15
 
15
16
  module Quandl::Command
16
-
17
17
  extend ActiveSupport::Concern
18
18
 
19
19
  included do
@@ -29,16 +29,7 @@ module Quandl::Command
29
29
  global_option '-U', '--url STRING', 'API url.'
30
30
  global_option '--force-yes', 'force y/n with yes'
31
31
 
32
- [
33
- Tasks::Delete,
34
- Tasks::Download,
35
- Tasks::Info,
36
- Tasks::List,
37
- Tasks::Login,
38
- Tasks::Update,
39
- Tasks::Upload,
40
- # register each task
41
- ].each{|task| task.configure(self) }
32
+ Tasks.each{|t| t.configure(self) }
42
33
 
43
34
  end
44
35
 
@@ -0,0 +1,45 @@
1
+ require 'yaml'
2
+
3
+ module Quandl
4
+ class Lang
5
+ class << self
6
+
7
+ def en
8
+ @en ||= self.new( File.join(Quandl::Command.root, 'config/locales/en.yml') )
9
+ @en.data
10
+ end
11
+
12
+ end
13
+
14
+ attr_accessor :data, :file
15
+
16
+ def initialize(file)
17
+ self.file = file
18
+ end
19
+
20
+ def data
21
+ @data ||= convert_to_ostruct_recursive( load_file, {} )
22
+ end
23
+
24
+ def load_file
25
+ YAML.load( File.read( file ) )
26
+ end
27
+
28
+ protected
29
+
30
+ def convert_to_ostruct_recursive(obj, options)
31
+ result = obj
32
+ if result.is_a? Hash
33
+ result = result.dup.symbolize_keys!
34
+ result.each do |key, val|
35
+ result[key] = convert_to_ostruct_recursive(val, options) unless options[:exclude].try(:include?, key)
36
+ end
37
+ result = OpenStruct.new result
38
+ elsif result.is_a? Array
39
+ result = result.map { |r| convert_to_ostruct_recursive(r, options) }
40
+ end
41
+ return result
42
+ end
43
+
44
+ end
45
+ end
@@ -21,14 +21,14 @@ class Tasks::Toolbelt::Build::Tarball < Tasks::Toolbelt
21
21
 
22
22
  def checkout_revision
23
23
  raise "You have unstaged commits." if %x{git status} =~ /Changes not staged for commit/
24
- sh "git checkout #{revision}"
25
- raise "Unable to checkout #{revision}" unless %x{git branch | grep '*'} =~ /#{revision}/
24
+ sh "git checkout #{options.revision}"
25
+ raise "Unable to checkout #{options.revision}" unless %x{git branch | grep '*'} =~ /#{options.revision}/
26
26
  end
27
27
 
28
28
 
29
29
  def copy_files_into_release
30
30
  # for each path
31
- ['lib', 'bin'].each do |path|
31
+ ['lib', 'bin', 'config'].each do |path|
32
32
  # recursively copy into release
33
33
  cp_r File.join( root_path, path ), File.join( release_path, path )
34
34
  end
@@ -9,7 +9,10 @@ class Tasks::Toolbelt::Push < Tasks::Toolbelt
9
9
  end
10
10
 
11
11
  def output_file
12
- @output_file ||= File.basename([ release_path, options.platform, options.revision, 'tar.gz' ].compact.join("."))
12
+ path = [ release_path, options.platform ]
13
+ path << revision if options.revision.present?
14
+ path << 'tar.gz'
15
+ @output_file ||= File.basename(path.compact.join("."))
13
16
  end
14
17
 
15
18
  end
data/tasks/toolbelt.rake CHANGED
@@ -33,8 +33,11 @@ namespace :toolbelt do
33
33
 
34
34
  desc "Build tarball, windows, and darwin and push to storage"
35
35
  task :all, :revision do |t, args|
36
+ # build tarball
36
37
  Rake::Task["toolbelt:release:tarball"].execute args.to_hash
38
+ # build windows exe
37
39
  Rake::Task["toolbelt:release:windows"].execute args.to_hash
40
+ # build darwin pkg
38
41
  Rake::Task["toolbelt:release:darwin"].execute args.to_hash
39
42
  end
40
43
 
@@ -54,11 +57,6 @@ namespace :toolbelt do
54
57
  Rake::Task["toolbelt:push:darwin"].execute args.to_hash
55
58
  end
56
59
 
57
- desc "Push install script to storage"
58
- task :installer do
59
- Toolbelt::Storage.create('install.sh', File.open( File.join( Toolbelt.root_path, 'scripts/install.sh')) )
60
- end
61
-
62
60
  desc "Build windows executable and push to storage"
63
61
  task :windows, :revision do |t, args|
64
62
  # build tarball
@@ -80,34 +78,32 @@ namespace :toolbelt do
80
78
  Toolbelt::Storage.create( 'Quandl Setup.exe', File.open(input_file) )
81
79
  end
82
80
  end
83
-
84
81
  end
85
82
 
83
+ task :installer do
84
+ Toolbelt::Storage.create('install.sh', File.open( File.join( Toolbelt.root_path, 'scripts/install.sh')) )
85
+ end
86
+
86
87
  end
87
88
 
88
89
  namespace :build do
89
90
 
90
- desc "Build windows executable"
91
91
  task :windows do |t, args|
92
92
  Toolbelt::Build::Windows.execute args.to_hash
93
93
  end
94
94
 
95
- desc "Build tarball"
96
95
  task :tarball, :revision do |t, args|
97
96
  Toolbelt::Build::Tarball.execute args.to_hash
98
97
  end
99
98
 
100
- desc "Build darwin pkg installer"
101
99
  task :darwin, :revision do |t, args|
102
100
  Toolbelt::Build::Darwin.execute args.to_hash
103
101
  end
104
102
 
105
- desc "Compile ruby from source"
106
103
  task :ruby do |t, args|
107
104
  Toolbelt::Build::Ruby.execute args.to_hash
108
105
  end
109
106
 
110
- desc "Clean build directories"
111
107
  task :clean do |t,args|
112
108
  rm_rf Toolbelt.tmp_path
113
109
  rm_rf Toolbelt.build_path
data/tasks/toolbelt.rb CHANGED
@@ -74,7 +74,7 @@ class Toolbelt
74
74
  end
75
75
 
76
76
  def revision
77
- @revision ||= options.revision || "master"
77
+ @revision ||= options.revision.to_s.gsub("/","-") || "master"
78
78
  end
79
79
 
80
80
  def resource(path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quandl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.22
4
+ version: 0.2.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Hilscher
@@ -279,6 +279,7 @@ files:
279
279
  - Rakefile
280
280
  - UPGRADE.md
281
281
  - bin/quandl
282
+ - config/locales/en.yml
282
283
  - dist/resources/pkg/Distribution.erb
283
284
  - dist/resources/pkg/PackageInfo.erb
284
285
  - dist/resources/pkg/postinstall
@@ -297,9 +298,11 @@ files:
297
298
  - lib/quandl/command/tasks/info.rb
298
299
  - lib/quandl/command/tasks/list.rb
299
300
  - lib/quandl/command/tasks/login.rb
301
+ - lib/quandl/command/tasks/uninstall.rb
300
302
  - lib/quandl/command/tasks/update.rb
301
303
  - lib/quandl/command/tasks/upload.rb
302
304
  - lib/quandl/command/version.rb
305
+ - lib/quandl/lang.rb
303
306
  - lib/quandl/utility.rb
304
307
  - lib/quandl/utility/config.rb
305
308
  - lib/quandl/utility/ruby_version.rb