active_console 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/active_console.gemspec +1 -1
- data/lib/active_console/active_console_array.rb +5 -0
- data/lib/active_console/active_console_hash.rb +5 -0
- data/lib/active_console/cols.rb +3 -3
- data/lib/active_console/rels.rb +1 -1
- data/lib/active_console/version.rb +1 -1
- data/spec/activeconsole/sqlite3 +0 -0
- data/spec/cols_spec.rb +8 -0
- data/spec/rels_spec.rb +4 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a866eba928ab3cf071218ddfea8a5b00b45fed14
|
4
|
+
data.tar.gz: f8f0542f18aa8349a7c19047252853b9cfb688de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a2a60b7afce609a31bf5e3b6062cc54f1ffbd98305fd862cfdddc803c97738c03c0ec3816ad6cdba27e89caf4e5e1e71b2e8122cdac54a199169a3b374afcb4
|
7
|
+
data.tar.gz: 70eaa8f20aaf6e548ccf50f3a0728697b8da263aceafc587fd1b66f96812c59ca3ba3f48abd929513329a33c9278de106a39db4991a9970f95de5020a1d2b134
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
|
4
|
+
active_console (0.0.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -46,7 +46,7 @@ PLATFORMS
|
|
46
46
|
ruby
|
47
47
|
|
48
48
|
DEPENDENCIES
|
49
|
-
|
49
|
+
active_console!
|
50
50
|
activerecord (~> 3.0)
|
51
51
|
awesome_print
|
52
52
|
bundler (~> 1.3)
|
data/active_console.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = [""]
|
11
11
|
spec.description = %q{Improvements and shortcuts for Rails console}
|
12
12
|
spec.summary = %q{Improvements and shortcuts for Rails console}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/jnsolutions/active_console"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
data/lib/active_console/cols.rb
CHANGED
@@ -4,16 +4,16 @@ module Cols
|
|
4
4
|
module ClassMethods
|
5
5
|
def cols(list = "")
|
6
6
|
|
7
|
-
matching_cols =
|
7
|
+
matching_cols = ActiveConsole::ActiveConsoleArray.new
|
8
8
|
searching_cols = list.split(",")
|
9
9
|
|
10
10
|
columns.each do |col|
|
11
11
|
if searching_cols.count > 0
|
12
12
|
searching_cols.select do |c|
|
13
|
-
matching_cols <<
|
13
|
+
matching_cols << ActiveConsole::ActiveConsoleHash[col.name, col.sql_type] if col.name.match(/^#{c.strip}/)
|
14
14
|
end
|
15
15
|
else
|
16
|
-
matching_cols <<
|
16
|
+
matching_cols << ActiveConsole::ActiveConsoleHash[col.name, col.sql_type]
|
17
17
|
end
|
18
18
|
end
|
19
19
|
matching_cols
|
data/lib/active_console/rels.rb
CHANGED
data/spec/activeconsole/sqlite3
CHANGED
Binary file
|
data/spec/cols_spec.rb
CHANGED
@@ -9,6 +9,14 @@ describe "model columns" do
|
|
9
9
|
expect(User.cols.count).to eq(3)
|
10
10
|
end
|
11
11
|
|
12
|
+
it "should return an array" do
|
13
|
+
expect(User.cols.class).to eq(ActiveConsole::ActiveConsoleArray)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "should be a Hash Array" do
|
17
|
+
expect(User.cols.first.class).to eq(ActiveConsole::ActiveConsoleHash)
|
18
|
+
end
|
19
|
+
|
12
20
|
end
|
13
21
|
|
14
22
|
context "when passing arguments" do
|
data/spec/rels_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- morhekil
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2014-01-
|
16
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: bundler
|
@@ -127,6 +127,8 @@ files:
|
|
127
127
|
- Rakefile
|
128
128
|
- active_console.gemspec
|
129
129
|
- lib/active_console.rb
|
130
|
+
- lib/active_console/active_console_array.rb
|
131
|
+
- lib/active_console/active_console_hash.rb
|
130
132
|
- lib/active_console/agrep.rb
|
131
133
|
- lib/active_console/alias.rb
|
132
134
|
- lib/active_console/cols.rb
|
@@ -145,7 +147,7 @@ files:
|
|
145
147
|
- spec/support/data.rb
|
146
148
|
- spec/support/models.rb
|
147
149
|
- spec/support/schema.rb
|
148
|
-
homepage:
|
150
|
+
homepage: https://github.com/jnsolutions/active_console
|
149
151
|
licenses:
|
150
152
|
- MIT
|
151
153
|
metadata: {}
|