draw_smd 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b039268f8de5094243b1641a7c328d0699c4a0b
4
- data.tar.gz: 3beef471485ba6d29d0c1e1a2b5ce60da211dca0
3
+ metadata.gz: 525eea38659c78efddcca9c94d882e51c8bdcc1b
4
+ data.tar.gz: 4a0111fbc31b9e95085e76f411a7ed8d17986869
5
5
  SHA512:
6
- metadata.gz: 7a2e9306a78294046cc7021e4e787049dcd79f1c0d2e8479458fa1a635cc137b3c52187bf0fdc8d7e960533cb4307399b350be77c93979c476c3de73ecf3ce10
7
- data.tar.gz: f62057ab6bb4996f9a566d99852794b6b1eefb7312d603451284378c86a5d9b9a4263fdf82ad838794eca70a367bf4317d258601bb31231be73feb9e21cdf42b
6
+ metadata.gz: fa7f9964ee5e4ceab785cf6fef5f4cee2075a5485b8126d6ed968a0706a3e18fab94a73e2848bc63bdd6d54faae481355b7aa10d9a510be576da12449b2243a2
7
+ data.tar.gz: 977dc2024881c30cd69dbc6c7be2253afc8a7dcd3b8645c422229a9c1c85fbc7a51b10682f815ea2d8d7b15c8a10f2417f1724de7739736f04282a6e3f0f4fef
@@ -41,6 +41,6 @@ div.schemas {
41
41
  }
42
42
 
43
43
  div.draw img {
44
- padding-top: 30px;
45
- padding-left: 40px;
44
+ padding-top: 40px;
45
+ padding-left: 80px;
46
46
  }
@@ -5,11 +5,18 @@ module DrawSmd
5
5
  schemas = ActiveRecord::Base.connection.tables
6
6
  schemas.delete('schema_migrations')
7
7
  schemas.map! {|schema| schema.singularize.camelize}
8
- schemas.each do |schema|
9
- schemas.delete(schema) unless Object.const_get(schema).respond_to?(:state_machines)
10
- end
8
+ schemas = schemas.inject([]) { |arr, schema|
9
+ arr << schema if state_machines?(schema)
10
+ arr
11
+ }
11
12
  schemas.sort
12
13
  end
14
+
15
+ def state_machines?(schema)
16
+ Object.const_get(schema).respond_to?(:state_machines)
17
+ rescue
18
+ false
19
+ end
13
20
  end
14
21
 
15
22
  def initialize(path)
@@ -1,3 +1,3 @@
1
1
  module DrawSmd
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: draw_smd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ogom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-01 00:00:00.000000000 Z
11
+ date: 2014-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails