dino_utils 0.1.12 → 0.1.13
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 +4 -4
- data/bin/_guard-core +5 -5
- data/bin/bundler +5 -5
- data/bin/coderay +5 -5
- data/bin/guard +5 -5
- data/bin/htmldiff +5 -5
- data/bin/ldiff +5 -5
- data/bin/listen +5 -5
- data/bin/pry +5 -5
- data/bin/rake +5 -5
- data/bin/rspec +5 -5
- data/bin/safe_yaml +5 -5
- data/bin/thor +5 -5
- data/dino_utils.gemspec +1 -0
- data/lib/dino/upsert.rb +1 -3
- data/lib/dino_utils/version.rb +1 -1
- data/lib/tn.rb +1 -3
- data/lib/tn/advisory_lock.rb +1 -1
- data/lib/tn/csv_builder.rb +2 -4
- data/lib/tn/http.rb +7 -7
- data/lib/tn/temp_file.rb +1 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64a93cd0c048f073f878ffcba4b238ea2e9a666f
|
4
|
+
data.tar.gz: c747c197fc9bc23c958844d0d1563efd7903ad40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f720d610eda32cb2da5796f021549723c8490e4ea39e4dd765b9d5fce55edf24d43e1358f466a18586f2d1ff9942880d606635ff56ed9b7048d4500ad720d46
|
7
|
+
data.tar.gz: b6665cf77b69146552577a16025963b61a78638eb3707ac2ba18319b522ac66a3d81029b033e97f4fa4c6b59ce1840284ec89fc8910e911fb9c1f559c36d5117
|
data/bin/_guard-core
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("guard", "_guard-core")
|
data/bin/bundler
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("bundler", "bundler")
|
data/bin/coderay
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("coderay", "coderay")
|
data/bin/guard
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("guard", "guard")
|
data/bin/htmldiff
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("diff-lcs", "htmldiff")
|
data/bin/ldiff
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("diff-lcs", "ldiff")
|
data/bin/listen
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("listen", "listen")
|
data/bin/pry
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("pry", "pry")
|
data/bin/rake
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/safe_yaml
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("safe_yaml", "safe_yaml")
|
data/bin/thor
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
# this file is here to facilitate running it.
|
7
7
|
#
|
8
8
|
|
9
|
-
require
|
10
|
-
ENV[
|
9
|
+
require "pathname"
|
10
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
11
11
|
Pathname.new(__FILE__).realpath)
|
12
12
|
|
13
|
-
require
|
14
|
-
require
|
13
|
+
require "rubygems"
|
14
|
+
require "bundler/setup"
|
15
15
|
|
16
|
-
load Gem.bin_path(
|
16
|
+
load Gem.bin_path("thor", "thor")
|
data/dino_utils.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.8"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
23
|
spec.add_dependency "activerecord", ">= 3"
|
24
|
+
spec.add_dependency "hashie", ">= 0"
|
24
25
|
spec.add_dependency "faraday"
|
25
26
|
spec.add_dependency "faraday_middleware"
|
26
27
|
spec.add_dependency "faraday-conductivity"
|
data/lib/dino/upsert.rb
CHANGED
@@ -23,9 +23,7 @@ module Dino
|
|
23
23
|
data_copy = {}
|
24
24
|
data ||= []
|
25
25
|
data.each do |k, v|
|
26
|
-
if v.
|
27
|
-
v = klass.column_for_attribute(k).type_cast_for_database(v)
|
28
|
-
end
|
26
|
+
v = klass.column_for_attribute(k).type_cast_for_database(v) if v.is_a?(Hash)
|
29
27
|
data_copy[k] = v
|
30
28
|
end
|
31
29
|
begin
|
data/lib/dino_utils/version.rb
CHANGED
data/lib/tn.rb
CHANGED
data/lib/tn/advisory_lock.rb
CHANGED
data/lib/tn/csv_builder.rb
CHANGED
@@ -21,7 +21,7 @@ module TN::CSVBuilder
|
|
21
21
|
row_data << row[key]
|
22
22
|
end
|
23
23
|
row.each do |key, _|
|
24
|
-
fail "#{key} not a valid csv header!" unless csv_headers.
|
24
|
+
fail "#{key} not a valid csv header!" unless csv_headers.key?(key)
|
25
25
|
end
|
26
26
|
csv << CSV::Row.new(csv_headers, row_data)
|
27
27
|
csv.flush if flush_after_each_row
|
@@ -33,9 +33,7 @@ module TN::CSVBuilder
|
|
33
33
|
file = TN::TempFile.new
|
34
34
|
csv(file, flush_after_each_row: flush_after_each_row)
|
35
35
|
file.close
|
36
|
-
if block_given?
|
37
|
-
yield(file)
|
38
|
-
end
|
36
|
+
yield(file) if block_given?
|
39
37
|
file
|
40
38
|
end
|
41
39
|
|
data/lib/tn/http.rb
CHANGED
@@ -9,12 +9,12 @@ module TN
|
|
9
9
|
def call(env)
|
10
10
|
@app.call(env)
|
11
11
|
rescue Faraday::ClientError => e
|
12
|
-
raise ClientError
|
12
|
+
raise ClientError, e
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.default_connection
|
17
|
-
Faraday.new do |conn|
|
16
|
+
def self.default_connection(*arguments)
|
17
|
+
Faraday.new(*arguments) do |conn|
|
18
18
|
conn.use TN::HTTP::WrapError
|
19
19
|
conn.use Faraday::Response::RaiseError
|
20
20
|
yield conn if block_given?
|
@@ -22,15 +22,15 @@ module TN
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
def self.form_connection
|
26
|
-
default_connection do |conn|
|
25
|
+
def self.form_connection(*arguments)
|
26
|
+
default_connection(*arguments) do |conn|
|
27
27
|
conn.request :url_encoded
|
28
28
|
yield conn if block_given?
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
def self.default_json_connection
|
33
|
-
default_connection do |conn|
|
32
|
+
def self.default_json_connection(*arguments)
|
33
|
+
default_connection(*arguments) do |conn|
|
34
34
|
conn.response :mashify
|
35
35
|
conn.response :json
|
36
36
|
yield conn if block_given?
|
data/lib/tn/temp_file.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dino_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Van Dyk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: hashie
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: faraday
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|