pluckers 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +51 -0
  3. data/Appraisals +22 -0
  4. data/CHANGELOG +7 -0
  5. data/CODE_OF_CONDUCT.md +49 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +56 -0
  8. data/LICENSE +674 -0
  9. data/README.md +40 -0
  10. data/Rakefile +10 -0
  11. data/circle.yml +15 -0
  12. data/doc/idea.md +49 -0
  13. data/doc/usage/basics.md +46 -0
  14. data/doc/usage/extending.md +109 -0
  15. data/doc/usage/globalize.md +54 -0
  16. data/doc/usage/relationships.md +216 -0
  17. data/doc/usage/renaming.md +26 -0
  18. data/lib/pluckers/base.rb +166 -0
  19. data/lib/pluckers/features/active_record_3_2/belongs_to_reflections.rb +16 -0
  20. data/lib/pluckers/features/active_record_3_2/globalize.rb +11 -0
  21. data/lib/pluckers/features/active_record_3_2/has_and_belongs_to_many_reflections.rb +40 -0
  22. data/lib/pluckers/features/active_record_3_2/has_many_reflections.rb +16 -0
  23. data/lib/pluckers/features/active_record_3_2/has_many_through_reflections.rb +17 -0
  24. data/lib/pluckers/features/active_record_3_2/has_one_reflections.rb +17 -0
  25. data/lib/pluckers/features/active_record_3_2/has_one_through_reflections.rb +17 -0
  26. data/lib/pluckers/features/active_record_3_2/pluck.rb +26 -0
  27. data/lib/pluckers/features/active_record_3_2/renaming.rb +11 -0
  28. data/lib/pluckers/features/active_record_3_2/simple_attributes.rb +11 -0
  29. data/lib/pluckers/features/active_record_3_2.rb +10 -0
  30. data/lib/pluckers/features/active_record_4_0/belongs_to_reflections.rb +16 -0
  31. data/lib/pluckers/features/active_record_4_0/globalize.rb +11 -0
  32. data/lib/pluckers/features/active_record_4_0/has_and_belongs_to_many_reflections.rb +40 -0
  33. data/lib/pluckers/features/active_record_4_0/has_many_reflections.rb +16 -0
  34. data/lib/pluckers/features/active_record_4_0/has_many_through_reflections.rb +17 -0
  35. data/lib/pluckers/features/active_record_4_0/has_one_reflections.rb +17 -0
  36. data/lib/pluckers/features/active_record_4_0/has_one_through_reflections.rb +17 -0
  37. data/lib/pluckers/features/active_record_4_0/pluck.rb +11 -0
  38. data/lib/pluckers/features/active_record_4_0/renaming.rb +11 -0
  39. data/lib/pluckers/features/active_record_4_0/simple_attributes.rb +11 -0
  40. data/lib/pluckers/features/active_record_4_0.rb +10 -0
  41. data/lib/pluckers/features/active_record_4_1/belongs_to_reflections.rb +16 -0
  42. data/lib/pluckers/features/active_record_4_1/globalize.rb +11 -0
  43. data/lib/pluckers/features/active_record_4_1/has_and_belongs_to_many_reflections.rb +40 -0
  44. data/lib/pluckers/features/active_record_4_1/has_many_reflections.rb +16 -0
  45. data/lib/pluckers/features/active_record_4_1/has_many_through_reflections.rb +17 -0
  46. data/lib/pluckers/features/active_record_4_1/has_one_reflections.rb +17 -0
  47. data/lib/pluckers/features/active_record_4_1/has_one_through_reflections.rb +17 -0
  48. data/lib/pluckers/features/active_record_4_1/pluck.rb +11 -0
  49. data/lib/pluckers/features/active_record_4_1/renaming.rb +11 -0
  50. data/lib/pluckers/features/active_record_4_1/simple_attributes.rb +11 -0
  51. data/lib/pluckers/features/active_record_4_1.rb +10 -0
  52. data/lib/pluckers/features/active_record_4_2/belongs_to_reflections.rb +15 -0
  53. data/lib/pluckers/features/active_record_4_2/globalize.rb +11 -0
  54. data/lib/pluckers/features/active_record_4_2/has_and_belongs_to_many_reflections.rb +39 -0
  55. data/lib/pluckers/features/active_record_4_2/has_many_reflections.rb +15 -0
  56. data/lib/pluckers/features/active_record_4_2/has_many_through_reflections.rb +17 -0
  57. data/lib/pluckers/features/active_record_4_2/has_one_reflections.rb +16 -0
  58. data/lib/pluckers/features/active_record_4_2/has_one_through_reflections.rb +17 -0
  59. data/lib/pluckers/features/active_record_4_2/pluck.rb +11 -0
  60. data/lib/pluckers/features/active_record_4_2/renaming.rb +11 -0
  61. data/lib/pluckers/features/active_record_4_2/simple_attributes.rb +11 -0
  62. data/lib/pluckers/features/active_record_4_2.rb +10 -0
  63. data/lib/pluckers/features/active_record_5_0/belongs_to_reflections.rb +15 -0
  64. data/lib/pluckers/features/active_record_5_0/globalize.rb +11 -0
  65. data/lib/pluckers/features/active_record_5_0/has_and_belongs_to_many_reflections.rb +39 -0
  66. data/lib/pluckers/features/active_record_5_0/has_many_reflections.rb +15 -0
  67. data/lib/pluckers/features/active_record_5_0/has_many_through_reflections.rb +17 -0
  68. data/lib/pluckers/features/active_record_5_0/has_one_reflections.rb +16 -0
  69. data/lib/pluckers/features/active_record_5_0/has_one_through_reflections.rb +17 -0
  70. data/lib/pluckers/features/active_record_5_0/pluck.rb +11 -0
  71. data/lib/pluckers/features/active_record_5_0/renaming.rb +11 -0
  72. data/lib/pluckers/features/active_record_5_0/simple_attributes.rb +11 -0
  73. data/lib/pluckers/features/active_record_5_0.rb +10 -0
  74. data/lib/pluckers/features/base/belongs_to_reflections.rb +131 -0
  75. data/lib/pluckers/features/base/globalize.rb +116 -0
  76. data/lib/pluckers/features/base/has_and_belongs_to_many_reflections.rb +190 -0
  77. data/lib/pluckers/features/base/has_many_reflections.rb +193 -0
  78. data/lib/pluckers/features/base/has_many_through_reflections.rb +131 -0
  79. data/lib/pluckers/features/base/has_one_reflections.rb +122 -0
  80. data/lib/pluckers/features/base/has_one_through_reflections.rb +129 -0
  81. data/lib/pluckers/features/base/pluck.rb +30 -0
  82. data/lib/pluckers/features/base/renaming.rb +55 -0
  83. data/lib/pluckers/features/base/simple_attributes.rb +64 -0
  84. data/lib/pluckers/version.rb +3 -0
  85. data/lib/pluckers.rb +7 -0
  86. data/pluckers.gemspec +38 -0
  87. metadata +236 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 50551996283d98347353e0d3f68f3a87eca33157
4
+ data.tar.gz: 979345a5b174c3fa09a5cd99c1a2ccaf43aee9fa
5
+ SHA512:
6
+ metadata.gz: 8c7e4187945a362f8c43f8331482774bd2728580b4dba7fa36d1c962d598fd04de75e0236dc90e61822bae4fdf7669b5b4b457fe3158475498917aaf85957bba
7
+ data.tar.gz: 320aed2d28f474b334982a129eac2ae44a10f2d1d18af051dbe3da16862b415d4235188011a3eb79e5f7b51d8a25094711cdc3ce75c2d427f6b27597905cd5fa
data/.gitignore ADDED
@@ -0,0 +1,51 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /rdoc/
36
+
37
+ ## Environment normalization:
38
+ /.bundle/
39
+ /vendor/bundle
40
+ /lib/bundler/man/
41
+
42
+ # for a library or gem, you might want to ignore these files since the code is
43
+ # intended to run in multiple environments; otherwise, check them in:
44
+ # Gemfile.lock
45
+ # .ruby-version
46
+ # .ruby-gemset
47
+
48
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
49
+ .rvmrc
50
+ .ruby-version*
51
+ .tool-versions
data/Appraisals ADDED
@@ -0,0 +1,22 @@
1
+ appraise "activerecord-3-2" do
2
+ gem "activerecord", "= 3.2.22.5"
3
+ end
4
+ appraise "activerecord-4-0" do
5
+ gem "activerecord", "= 4.0.13"
6
+ end
7
+
8
+ appraise "activerecord-4-1" do
9
+ gem "activerecord", "= 4.1.16"
10
+ gem "minitest-matchers_vaccine"
11
+ end
12
+
13
+ appraise "activerecord-4-2" do
14
+ gem "activerecord", "= 4.2.7.1"
15
+ gem "minitest-matchers_vaccine"
16
+ end
17
+
18
+ appraise "activerecord-5-0" do
19
+ gem "activerecord", "= 5.0.1"
20
+ gem "globalize", github: 'globalize/globalize'
21
+ gem "minitest-matchers_vaccine"
22
+ end
data/CHANGELOG ADDED
@@ -0,0 +1,7 @@
1
+ * 1.0.0
2
+
3
+ - First working version
4
+ - Pluck simple attributes
5
+ - Pluck Globalized attributes
6
+ - Pluck relationships
7
+ - Rails 3.2, 4.X and 5.0 support
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at davidjbrenes@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pluckers.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,56 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pluckers (0.1.0)
5
+ activerecord (> 3.2, < 5.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (4.2.7)
11
+ activesupport (= 4.2.7)
12
+ builder (~> 3.1)
13
+ activerecord (4.2.7)
14
+ activemodel (= 4.2.7)
15
+ activesupport (= 4.2.7)
16
+ arel (~> 6.0)
17
+ activesupport (4.2.7)
18
+ i18n (~> 0.7)
19
+ json (~> 1.7, >= 1.7.7)
20
+ minitest (~> 5.1)
21
+ thread_safe (~> 0.3, >= 0.3.4)
22
+ tzinfo (~> 1.1)
23
+ appraisal (2.1.0)
24
+ bundler
25
+ rake
26
+ thor (>= 0.14.0)
27
+ arel (6.0.3)
28
+ builder (3.2.2)
29
+ byebug (9.0.5)
30
+ globalize (5.0.1)
31
+ activemodel (>= 4.2.0, < 4.3)
32
+ activerecord (>= 4.2.0, < 4.3)
33
+ i18n (0.7.0)
34
+ json (1.8.3)
35
+ minitest (5.9.0)
36
+ rake (10.5.0)
37
+ sqlite3 (1.3.11)
38
+ thor (0.19.1)
39
+ thread_safe (0.3.5)
40
+ tzinfo (1.2.2)
41
+ thread_safe (~> 0.1)
42
+
43
+ PLATFORMS
44
+ ruby
45
+
46
+ DEPENDENCIES
47
+ appraisal (~> 2.1.0)
48
+ byebug
49
+ globalize
50
+ minitest
51
+ pluckers!
52
+ rake (~> 10.0)
53
+ sqlite3
54
+
55
+ BUNDLED WITH
56
+ 1.13.6