blockspring-cli 0.0.8 → 0.0.9

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: 2199ec07ab37e2240a7a71926da6987f3c79d919
4
- data.tar.gz: 3995e24e9d19f65b51a496256bb822e825ff6201
3
+ metadata.gz: db5beb5a65470e420b59d1e7aec32e116ad5c254
4
+ data.tar.gz: 12bcb0cb001032d1bea981f9a0c74629feb52e1c
5
5
  SHA512:
6
- metadata.gz: b1a4f5467e6967052800e08ea77bdc7ccfdf992efdd185cfa42989b16ff26da4374efdbfca22d86119c3fd79f98b09f4d97ca947dca165549ff109130e998351
7
- data.tar.gz: 803d0d6c3086a62248dafa2168294d8e03ef1e8d53b135588394f7c605a38373f40b90fdf4a00351efcb933cb40e9a608f72b05a62c9b23ce4e3397655cfda92
6
+ metadata.gz: 3b8a3d0d14ca9c1c9e6742644988dc1180bfa9c404fadea1a43717f58568f42c7a92a61d49f2df4fb847d52d686e7731619c4d94d0e3c687f8550d3b3cac3cdf
7
+ data.tar.gz: 9a106fff42463f833d7026662f54421f119654b06a37a7733d2515930f7d58775942c8df552846092d323f25d81b7805a4cf3597e7ec6e8791ec481610c19005
Binary file
@@ -65,13 +65,22 @@ class Blockspring::CLI::Command::Block < Blockspring::CLI::Command::Base
65
65
  def push
66
66
  _user, key = Blockspring::CLI::Auth.get_credentials
67
67
 
68
- unless File.exists?('blockspring.json')
69
- return error('blockspring.json file not found')
68
+ if not(File.exists?('blockspring.json'))
69
+ config_json = {
70
+ 'language' => nil
71
+ }
72
+
73
+ # hardcode block.* name. find first one and set that to language.
74
+ Dir["block.*"].each do |block_file|
75
+ language_match = block_file.match(/\Ablock\.(.*)/)
76
+ config_json['language'] = language_match ? language_match.captures[0] : nil
77
+ break
78
+ end
79
+ else
80
+ config_text = File.read('blockspring.json')
81
+ config_json = JSON.parse(config_text)
70
82
  end
71
83
 
72
- config_text = File.read('blockspring.json')
73
- config_json = JSON.parse(config_text)
74
-
75
84
  if config_json['language'].nil?
76
85
  return error('You must declare a language in your blockspring.json file.')
77
86
  end
@@ -1,5 +1,5 @@
1
1
  module Blockspring
2
2
  module CLI
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockspring-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blockspring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-30 00:00:00.000000000 Z
11
+ date: 2014-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,6 +116,7 @@ executables:
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
+ - ".DS_Store"
119
120
  - ".editorconfig"
120
121
  - ".gitignore"
121
122
  - Gemfile