schema2plantuml 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 +4 -4
- data/README.md +6 -24
- data/lib/schema2plantuml/active_record/schema.rb +4 -6
- data/lib/schema2plantuml/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7bec73f1c1db6aa35fbe18ffeacb109a5130522
|
4
|
+
data.tar.gz: 8a1e90497de59255b688a0ba90db8ae56d5078b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c180181f766c6ff20d4f00b0c0f2ccbc185d913ebdf07df0271a64d39b9797dcdd1e0f3eda35edc40c815c45a80043ebb834bd1aac7c6038a9be5fd6871712
|
7
|
+
data.tar.gz: 61d3c0f4ef7b7555bb0bc8e4d79a213331e38320cdc070e30a47ec3da2958446117ebb53794b7ec5df442fb392c766ad43d7f4e7098f43840df15fe4907b25e3
|
data/README.md
CHANGED
@@ -1,38 +1,20 @@
|
|
1
1
|
# Schema2plantuml
|
2
2
|
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/schema2plantuml`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
3
|
## Installation
|
8
4
|
|
9
|
-
Add this line to your application's Gemfile:
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
gem 'schema2plantuml'
|
13
5
|
```
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
|
21
|
-
$ gem install schema2plantuml
|
6
|
+
$ gem install schema2plantuml
|
7
|
+
```
|
22
8
|
|
23
9
|
## Usage
|
24
10
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
11
|
+
```
|
12
|
+
$ schema2plantuml db/schema.rb
|
13
|
+
```
|
32
14
|
|
33
15
|
## Contributing
|
34
16
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
17
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ukstudio/schema2plantuml.
|
36
18
|
|
37
19
|
|
38
20
|
## License
|
@@ -9,11 +9,9 @@ module ActiveRecord
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def create_table(table_name, _options, &block)
|
12
|
-
puts
|
13
|
-
|
14
|
-
|
15
|
-
}
|
16
|
-
TABLE
|
12
|
+
puts "object #{table_name} {"
|
13
|
+
block.call(Table2plantuml.new)
|
14
|
+
puts "}"
|
17
15
|
end
|
18
16
|
|
19
17
|
def add_foreign_key(child_table_name, parent_table_name, _options = {})
|
@@ -27,7 +25,7 @@ module ActiveRecord
|
|
27
25
|
|
28
26
|
class Table2plantuml
|
29
27
|
def method_missing(column_type, column_name, _options = {})
|
30
|
-
"#{column_name} : #{column_type}"
|
28
|
+
puts "#{column_name} : #{column_type}"
|
31
29
|
end
|
32
30
|
end
|
33
31
|
end
|