shopifydev 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shopifydev/pry/save_json.rb +3 -0
- data/lib/shopifydev/version.rb +1 -1
- metadata +4 -4
@@ -1,8 +1,11 @@
|
|
1
1
|
module Kernel
|
2
2
|
def save_json(obj, path=nil)
|
3
|
+
path = Pathname.new(path) unless path.nil?
|
3
4
|
json = Oj.dump(obj, object:true, circular:true)
|
5
|
+
path = path.sub_ext('json') unless path.nil?
|
4
6
|
path = UnixTree.get_path(path, require: :file, new: true)
|
5
7
|
if path
|
8
|
+
path = path.sub_ext('json') unless path.nil?
|
6
9
|
puts Color.green{"writing json to #{path.to_s}..."}
|
7
10
|
File.open(path, 'w'){|f| f.write(json)}
|
8
11
|
true
|
data/lib/shopifydev/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopifydev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shopify_api
|
@@ -250,7 +250,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
segments:
|
252
252
|
- 0
|
253
|
-
hash:
|
253
|
+
hash: -1124862899948449462
|
254
254
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
255
255
|
none: false
|
256
256
|
requirements:
|
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
version: '0'
|
260
260
|
segments:
|
261
261
|
- 0
|
262
|
-
hash:
|
262
|
+
hash: -1124862899948449462
|
263
263
|
requirements: []
|
264
264
|
rubyforge_project:
|
265
265
|
rubygems_version: 1.8.25
|