scenic_mysql 0.1.2 → 0.1.3

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: 4803974ec78680b939418294f691a3c6bf5d340f
4
- data.tar.gz: 921ff1ef7337d24c7d1adf7727553d72d00bbc2a
3
+ metadata.gz: 7ed14dfd0045d9db90183eb351f728cdda096a3c
4
+ data.tar.gz: 7b7fe8414773733dbc1f9012da1657842c5ecc8b
5
5
  SHA512:
6
- metadata.gz: 1b072cd90d226465543254d2feb30e9a8624d21ca8f43d5844a3dc8d6a275a7a15132406cca0b60bd2f5ed769ea1940b48823e81409a114edfccd49492a55f97
7
- data.tar.gz: 7907d25b17e8495d22ceb1972f389b17af3bbd061440365e603d64fd41052fbb6bb60ee1053d6cbc9b0082a807eb2c959772f0bbb124d575dd05709fb084ee8c
6
+ metadata.gz: e865abec62ebf5d09795a713ca772521c6170870bd5448ba2b4b609055b52926dfeb9fe2910775588bb94b7c12e5db9e51a37b90a58506c6d234ed132fa7b20a
7
+ data.tar.gz: 91ec7d2727d9946f4185a38e5b3678e67b734167a7679f7101cbde9d6fb35d8ab5390f34e4b7dc3b104e0ad7fc68f362e9308ab3d77a08dc898dfb4fc59642d2
data/README.md CHANGED
@@ -1,14 +1,13 @@
1
- # ScenicMysql
1
+ # Scenic Mysql Adapter
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/scenic_mysql`. 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
3
+ This gem adds MySQL support for the wonderful [Scenic](https://github.com/thoughtbot/scenic) gem by Thoughtbot.
6
4
 
7
5
  ## Installation
8
6
 
9
7
  Add this line to your application's Gemfile:
10
8
 
11
9
  ```ruby
10
+ gem 'scenic'
12
11
  gem 'scenic_mysql'
13
12
  ```
14
13
 
@@ -22,20 +21,31 @@ Or install it yourself as:
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
24
+ Add an initializer with the following code:
28
25
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+ ```ruby
27
+ # This code overwrites Mysql2Adapter's `database` method,
28
+ # which pulls back all tables with views.
29
+ #
30
+ # The new method returns only tables, without the views.
31
+ #
32
+ ActiveRecord::ConnectionAdapters::Mysql2Adapter.send(
33
+ :include, Scenic::Adapters::Mysql::TablesDefinition
34
+ )
35
+
36
+ # Tell Scenic to use MySQL instead of the defaulted PostgreSQL.
37
+ Scenic.configure do |config|
38
+ config.database = Scenic::Adapters::Mysql.new
39
+ end
40
+ ```
30
41
 
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).
42
+ Note that the adapter currently does not support materialized views for MySQL.
32
43
 
33
44
  ## Contributing
34
45
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/scenic_mysql.
46
+ Bug reports and pull requests are welcome on GitHub at https://github.com/startweaving/scenic_mysql.
36
47
 
37
48
 
38
49
  ## License
39
50
 
40
51
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
-
@@ -1,7 +1,7 @@
1
1
  module Scenic
2
2
  module Adapters
3
3
  class Mysql
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
@@ -40,7 +40,8 @@ module Scenic
40
40
 
41
41
  Scenic::View.new(
42
42
  name: table_name,
43
- definition: scrub_view_def(view_def)
43
+ definition: scrub_view_def(view_def),
44
+ materialized: false
44
45
  )
45
46
  end
46
47
 
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scenic_mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elpizo Choi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2016-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: scenic
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.1.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.10'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '10.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description: Adds support for MySQL views in ActiveRecord via the Scenic gem
@@ -73,9 +73,9 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
77
- - .rspec
78
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
79
  - Gemfile
80
80
  - LICENSE.txt
81
81
  - README.md
@@ -100,17 +100,17 @@ require_paths:
100
100
  - lib
101
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
102
  requirements:
103
- - - '>='
103
+ - - ">="
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.2.2
113
+ rubygems_version: 2.4.8
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Adds MySQL support for Scenic gem