longbow 0.1.1 → 0.1.2

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: 86277771094b698394dba33a73564319e357dbe8
4
- data.tar.gz: 515898e907ed93a454e3f2d2e7fa9d0878d216a0
3
+ metadata.gz: 58aff1ce7424750e94d76afd27407b47356aeeb2
4
+ data.tar.gz: 52af22408ae8b062d6baa1c75c92f45b6bbe5041
5
5
  SHA512:
6
- metadata.gz: 3cf79384286e062107efcb024ff46fa929408df39a5d403c2ee405bffe37f5c90fc4fcabd80e5ed4488c5a8b4003cd3c3b1893e159045cf4b92d4c11e2bfc47f
7
- data.tar.gz: 56698aaefc70ed3d0026018cbd9087639d013bcd621e8028256881aa303e373333187505e2852026c2349dd5aa75f90cbd5e8798bf143e99cd12d593e7e19d39
6
+ metadata.gz: ac0a527a220e308dae41195ffa5cea3dd4deb9cd470f8af12371bd0b3ce22ef96f53386bcd0e2c0413cb0d5f724fe1a411e15b768bd731039432040fb68149ab
7
+ data.tar.gz: 806fda97413aaedefe1e3ee88065bfc1e7022006e7e7bd46b380c14ce69fce3d5c4468b8fce4611c9d8fe021028c17a3d3ea860bf6cc3a1a38424e225960e9c6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- longbow (0.1.1)
4
+ longbow (0.1.2)
5
5
  bundler (~> 1.3)
6
6
  commander (~> 4.1)
7
7
  dotenv (~> 0.7)
data/README.md CHANGED
@@ -105,8 +105,9 @@ If you leave off the `-n` option, it will run for all targets in the `longbow.js
105
105
  **Other Options**
106
106
 
107
107
  * `-d, --directory` - if not in the current directory, specify a new path
108
+ * `-u, --url` - the url of a longbow formatted JSON file
108
109
 
109
- `longbow shoot -n NameOfTarget -d ~/Path/To/App`
110
+ `longbow shoot -n NameOfTarget -d ~/Path/To/App -u http://someurl.com/longbow.json`
110
111
 
111
112
  ## Global Options
112
113
 
@@ -32,11 +32,12 @@ command :shoot do |c|
32
32
  end
33
33
 
34
34
  # Break if Bad
35
- unless obj
36
- Longbow::red "\n Invalid JSON. Please lint the file, and try again.\n"
35
+ unless obj || Longbow::lint_json_object(obj)
36
+ Longbow::red "\n Invalid JSON. Please lint the file, and try again.\n"
37
37
  next
38
38
  end
39
39
 
40
+
40
41
  # Check for Target Name
41
42
  if @target_name
42
43
  obj['targets'].each do |t|
data/lib/longbow/json.rb CHANGED
@@ -29,6 +29,7 @@ module Longbow
29
29
  return json_object_from_string contents
30
30
  end
31
31
 
32
+
32
33
  def self.json_object_from_string contents
33
34
  begin
34
35
  !!JSON.parse(contents)
@@ -39,4 +40,11 @@ module Longbow
39
40
  return JSON.parse(contents)
40
41
  end
41
42
 
43
+
44
+ def self.lint_json_object obj
45
+ return false unless obj
46
+ return false unless obj['targets']
47
+ return true
48
+ end
49
+
42
50
  end
@@ -2,13 +2,12 @@ $:.push File.expand_path('../', __FILE__)
2
2
  require 'colors'
3
3
 
4
4
  module Longbow
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
 
7
7
  def self.check_for_newer_version
8
- if `gem outdated -r`.include? 'longbow'
9
- puts
10
- Longbow::purple " A newer version of longbow is available. Run 'gem update longbow'."
11
- puts
8
+ v = Gem.latest_version_for 'longbow'
9
+ unless v == VERSION
10
+ Longbow::purple "\n A newer version of longbow is available. Run '[sudo] gem update longbow'."
12
11
  end
13
12
  end
14
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: longbow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Intermark Interactive