clowne 1.0.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rspec-jruby.yml +33 -0
  3. data/.github/workflows/rspec-truffle.yml +35 -0
  4. data/.github/workflows/rspec.yml +51 -0
  5. data/.github/workflows/rubocop.yml +20 -0
  6. data/.rubocop.yml +13 -52
  7. data/CHANGELOG.md +23 -0
  8. data/Gemfile +9 -9
  9. data/README.md +10 -10
  10. data/Rakefile +3 -3
  11. data/clowne.gemspec +15 -9
  12. data/docs/.nojekyll +0 -0
  13. data/docs/.rubocop.yml +5 -2
  14. data/docs/CNAME +1 -0
  15. data/docs/README.md +131 -0
  16. data/docs/_sidebar.md +25 -0
  17. data/docs/active_record.md +2 -5
  18. data/docs/after_clone.md +53 -0
  19. data/docs/after_persist.md +9 -12
  20. data/docs/architecture.md +2 -5
  21. data/docs/assets/docsify.min.js +1 -0
  22. data/docs/assets/prism-ruby.min.js +1 -0
  23. data/docs/assets/styles.css +348 -0
  24. data/docs/assets/vue.css +1 -0
  25. data/docs/clone_mapper.md +3 -6
  26. data/docs/customization.md +1 -4
  27. data/docs/exclude_association.md +1 -4
  28. data/docs/finalize.md +6 -10
  29. data/docs/from_v02_to_v1.md +2 -10
  30. data/docs/getting_started.md +171 -0
  31. data/docs/implicit_cloner.md +1 -4
  32. data/docs/include_association.md +14 -4
  33. data/docs/index.html +29 -0
  34. data/docs/init_as.md +4 -8
  35. data/docs/inline_configuration.md +1 -4
  36. data/docs/nullify.md +1 -5
  37. data/docs/operation.md +4 -7
  38. data/docs/parameters.md +7 -10
  39. data/docs/sequel.md +1 -4
  40. data/docs/supported_adapters.md +3 -6
  41. data/docs/testing.md +18 -21
  42. data/docs/traits.md +1 -4
  43. data/gemfiles/activerecord42.gemfile +5 -5
  44. data/gemfiles/jruby.gemfile +6 -6
  45. data/gemfiles/railsmaster.gemfile +6 -6
  46. data/lib/clowne/adapters/active_record/associations/base.rb +1 -1
  47. data/lib/clowne/adapters/active_record/associations/belongs_to.rb +28 -0
  48. data/lib/clowne/adapters/active_record/associations/has_one.rb +1 -2
  49. data/lib/clowne/adapters/active_record/associations.rb +7 -5
  50. data/lib/clowne/adapters/active_record/dsl.rb +2 -2
  51. data/lib/clowne/adapters/active_record/resolvers/association.rb +1 -2
  52. data/lib/clowne/adapters/active_record.rb +3 -3
  53. data/lib/clowne/adapters/base/association.rb +1 -1
  54. data/lib/clowne/adapters/base.rb +14 -8
  55. data/lib/clowne/adapters/sequel/associations/base.rb +2 -2
  56. data/lib/clowne/adapters/sequel/associations/many_to_many.rb +4 -4
  57. data/lib/clowne/adapters/sequel/associations/one_to_many.rb +1 -1
  58. data/lib/clowne/adapters/sequel/associations/one_to_one.rb +1 -1
  59. data/lib/clowne/adapters/sequel/associations.rb +5 -5
  60. data/lib/clowne/adapters/sequel/operation.rb +6 -3
  61. data/lib/clowne/adapters/sequel/resolvers/after_persist.rb +1 -1
  62. data/lib/clowne/adapters/sequel/resolvers/association.rb +1 -2
  63. data/lib/clowne/adapters/sequel/specifications/after_persist_does_not_support.rb +1 -1
  64. data/lib/clowne/adapters/sequel.rb +7 -7
  65. data/lib/clowne/cloner.rb +11 -11
  66. data/lib/clowne/declarations/after_clone.rb +21 -0
  67. data/lib/clowne/declarations/after_persist.rb +3 -3
  68. data/lib/clowne/declarations/exclude_association.rb +1 -1
  69. data/lib/clowne/declarations/finalize.rb +3 -3
  70. data/lib/clowne/declarations/include_association.rb +1 -1
  71. data/lib/clowne/declarations/init_as.rb +3 -3
  72. data/lib/clowne/declarations/nullify.rb +2 -2
  73. data/lib/clowne/declarations/trait.rb +1 -1
  74. data/lib/clowne/declarations.rb +15 -14
  75. data/lib/clowne/ext/orm_ext.rb +1 -1
  76. data/lib/clowne/ext/record_key.rb +1 -1
  77. data/lib/clowne/ext/string_constantize.rb +1 -1
  78. data/lib/clowne/ext/yield_self_then.rb +2 -2
  79. data/lib/clowne/planner.rb +1 -1
  80. data/lib/clowne/resolvers/after_clone.rb +18 -0
  81. data/lib/clowne/resolvers/after_persist.rb +1 -1
  82. data/lib/clowne/resolvers/finalize.rb +1 -1
  83. data/lib/clowne/resolvers/init_as.rb +0 -1
  84. data/lib/clowne/rspec/clone_association.rb +3 -4
  85. data/lib/clowne/rspec/clone_associations.rb +2 -2
  86. data/lib/clowne/rspec/helpers.rb +1 -1
  87. data/lib/clowne/rspec.rb +3 -3
  88. data/lib/clowne/utils/clone_mapper.rb +1 -1
  89. data/lib/clowne/utils/operation.rb +19 -7
  90. data/lib/clowne/utils/params.rb +1 -1
  91. data/lib/clowne/version.rb +1 -1
  92. data/lib/clowne.rb +10 -11
  93. metadata +60 -38
  94. data/.travis.yml +0 -55
  95. data/docs/alternatives.md +0 -26
  96. data/docs/basic_example.md +0 -83
  97. data/docs/installation.md +0 -46
  98. data/docs/overview.md +0 -24
  99. data/docs/web/.gitignore +0 -11
  100. data/docs/web/README.md +0 -6
  101. data/docs/web/core/Footer.js +0 -88
  102. data/docs/web/i18n/en.json +0 -140
  103. data/docs/web/package.json +0 -14
  104. data/docs/web/pages/en/help.js +0 -50
  105. data/docs/web/pages/en/index.js +0 -231
  106. data/docs/web/pages/en/users.js +0 -47
  107. data/docs/web/sidebars.json +0 -37
  108. data/docs/web/siteConfig.js +0 -46
  109. data/docs/web/static/css/custom.css +0 -235
  110. data/docs/web/static/fonts/FiraCode-Medium.woff +0 -0
  111. data/docs/web/static/fonts/FiraCode-Regular.woff +0 -0
  112. data/docs/web/static/img/favicon/favicon.ico +0 -0
  113. data/docs/web/yarn.lock +0 -1741
@@ -1,88 +0,0 @@
1
- /**
2
- * Copyright (c) 2017-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- const React = require('react');
9
-
10
- class Footer extends React.Component {
11
- docUrl(doc, language) {
12
- const baseUrl = this.props.config.baseUrl;
13
- return baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
14
- }
15
-
16
- pageUrl(doc, language) {
17
- const baseUrl = this.props.config.baseUrl;
18
- return baseUrl + (language ? language + '/' : '') + doc;
19
- }
20
-
21
- render() {
22
- const currentYear = new Date().getFullYear();
23
-
24
- const yearLabel = currentYear > 2018 ? `2018–${currentYear}` : currentYear;
25
-
26
- return (
27
- <footer className="nav-footer" id="footer">
28
- <section className="sitemap">
29
- <div className="footer--block">
30
- <h5>Project</h5>
31
- <div className="footer--list--item">
32
- <a href={this.props.config.repoUrl} target="_blank">
33
- GitHub
34
- </a>
35
- </div>
36
- <div className="footer--list--item">
37
- <a href={this.props.config.gemUrl} target="_blank">
38
- RubyGems
39
- </a>
40
- </div>
41
- </div>
42
- {/* <div className="footer--block">
43
- <h5>Community</h5>
44
- <div className="footer--list--item">
45
- <a href="https://discordapp.com/" target="_blank">Project Chat</a>
46
- </div>
47
- <div className="footer--list--item">
48
- <a href="https://twitter.com/" target="_blank">
49
- Twitter
50
- </a>
51
- </div>
52
- </div>
53
- */}
54
- <div className="footer--block">
55
- <h5>Resources</h5>
56
- <div className="footer--list--item">
57
- <a href="https://evilmartians.com/chronicles/clowne-clone-ruby-models-with-a-smile" target="_blank">Clowne: clone Ruby models with a smile</a>
58
- </div>
59
- </div>
60
- <div className="footer--block legals">
61
- <p className="footer--copy">
62
- <span className="copy">{yearLabel}</span>&nbsp;
63
- <a href="https://evilmartians.com" target="_blank">Evil Martians</a>
64
- </p>
65
- <div className="footer--list--item">
66
- <p>Released under the <a href="https://github.com/palkan/clowne/blob/master/LICENSE.txt" target="_blank">MIT license</a></p>
67
- </div>
68
- <div className="footer--list--item">
69
- <p>Built with <a href="https://docusaurus.io" target="_blank">Docusaurus</a></p>
70
- </div>
71
- </div>
72
- </section>
73
- <div className="footer--humanoids">
74
- <div className="humanoids">
75
- <div className="humanoids__martian">
76
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 108 92"><path fill="#E2CBB5" d="M26 88L8 78l18-10"></path><path fill="#9FA628" d="M94 92v-6H44c-5.5 0-10-4.5-10-10s4.5-10 10-10h50V32c0-14-7.9-22-22-22H48c-14.1 0-22 8-22 22v60h68z"></path><circle fill="#FFF" cx="48" cy="50" r="8"></circle><circle fill="#FFF" cx="72" cy="50" r="8"></circle><circle fill="#BF6C35" cx="48" cy="50" r="4"></circle><circle fill="#BF6C35" cx="72" cy="50" r="4"></circle><g fill="#663F4C"><path d="M48 60c-5.5 0-10-4.5-10-10s4.5-10 10-10 10 4.5 10 10-4.5 10-10 10zm0-16c-3.3 0-6 2.7-6 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zM82 50c0 5.5-4.5 10-10 10s-10-4.5-10-10 4.5-10 10-10 10 4.5 10 10zm-16 0c0 3.3 2.7 6 6 6s6-2.7 6-6-2.7-6-6-6-6 2.7-6 6z"></path><path d="M102 8c-3.8 0-6-2.2-6-6 0-1.1-.9-2-2-2s-2 .9-2 2c0 2.2.5 4.1 1.5 5.7L88.2 13c-4-3.3-9.5-5-16.2-5H48c-6.7 0-12.2 1.7-16.2 4.9l-5.3-5.3C27.5 6.1 28 4.2 28 2c0-1.1-.9-2-2-2s-2 .9-2 2c0 3.8-2.2 6-6 6-1.1 0-2 .9-2 2s.9 2 2 2c2.2 0 4.1-.5 5.7-1.5l5.3 5.3c-3.2 4-4.9 9.5-4.9 16.2v34.8L3.9 78 24 89v3h4V32c0-12.9 7.1-20 20-20h24c12.9 0 20 7.1 20 20v32H44c-6.6 0-12 5.4-12 12s5.4 12 12 12h48v4h4v-8h-2l-4-8-4 8h-4l-4-8-4 8h-4l-4-8-4 8h-4l-4-8-4 8h-4l-4-8-3.1 6.2C37.1 80.7 36 78.5 36 76c0-4.4 3.6-8 8-8l4 8 4-8h4l4 8 4-8h4l4 8 4-8h4l4 8 4-8h8V32c0-6.7-1.7-12.2-4.9-16.2l5.3-5.3c1.6 1 3.5 1.5 5.7 1.5 1.1 0 2-.9 2-2s-1-2-2.1-2zM24 84.4L12.1 78 24 71.4v13z"></path></g></svg>
77
- </div>
78
- <div className="humanoids__human">
79
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 108 92"><path fill="#E2CBB5" d="M14 62v30h68v-6H32c-5.5 0-10-4.5-10-10s4.5-10 10-10h50v-4c4 0 8-3.6 8-8s-4-8-8-8V32c0-14-7.9-22-22-22H36c-14.1 0-22 8-22 22v14c-4 0-8 3.6-8 8s4 8 8 8z"></path><circle fill="#FFF" cx="36" cy="50" r="8"></circle><circle fill="#FFF" cx="60" cy="50" r="8"></circle><circle fill="#9FA628" cx="36" cy="50" r="4"></circle><circle fill="#9FA628" cx="60" cy="50" r="4"></circle><path fill="#BF6C35" d="M60 10H36c-14.1 0-22 8-22 22v2l4-4 6 6 6-6 6 6 6-6 6 6 6-6 6 6 6-6 6 6 6-6 4 4v-2c0-14-7.9-22-22-22z"></path><g fill="#663F4C"><path d="M36 60c-5.5 0-10-4.5-10-10s4.5-10 10-10 10 4.5 10 10-4.5 10-10 10zm0-16c-3.3 0-6 2.7-6 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6zM60 60c-5.5 0-10-4.5-10-10s4.5-10 10-10 10 4.5 10 10-4.5 10-10 10zm0-16c-3.3 0-6 2.7-6 6s2.7 6 6 6 6-2.7 6-6-2.7-6-6-6z"></path><path d="M12 63.8V92h4V32c0-12.9 7.1-20 20-20h24c12.9 0 20 7.1 20 20v32H32c-6.6 0-12 5.4-12 12s5.4 12 12 12h48v4h4v-8H74v-1c0-1.7-1.3-3-3-3s-3 1.3-3 3v1h-6v-1c0-1.7-1.3-3-3-3s-3 1.3-3 3v1h-6v-1c0-1.7-1.3-3-3-3s-3 1.3-3 3v1h-6v-1c0-1.7-1.3-3-3-3s-3 1.3-3 3v1c-4 0-8-3.6-8-8s3.6-8 8-8h6v1c0 1.7 1.3 3 3 3s3-1.3 3-3v-1h6v1c0 1.7 1.3 3 3 3s3-1.3 3-3v-1h6v1c0 1.7 1.3 3 3 3s3-1.3 3-3v-1h6v1c0 1.7 1.3 3 3 3s3-1.3 3-3v-1h4v-4.2c5-.9 8-5 8-9.8s-3-8.9-8-9.8V32c0-15.3-8.7-24-24-24H36c-15.3 0-24 8.7-24 24v12.2c-5 .9-8 5-8 9.8s3 8.9 8 9.8zm72-15.5c2 .8 4 3 4 5.7s-2 4.8-4 5.7V48.3zm-72 0v11.3c-2-.8-4-3-4-5.7s2-4.7 4-5.6z"></path></g></svg>
80
- </div>
81
- </div>
82
- </div>
83
- </footer>
84
- );
85
- }
86
- }
87
-
88
- module.exports = Footer;
@@ -1,140 +0,0 @@
1
- {
2
- "_comment": "This file is auto-generated by write-translations.js",
3
- "localized-strings": {
4
- "next": "Next",
5
- "previous": "Previous",
6
- "tagline": "A flexible gem for cloning your models",
7
- "active_record": "Active Record",
8
- "after_persist": "After Persist",
9
- "alternatives": "Motivation & Alternatives",
10
- "architecture": "Architecture",
11
- "basic_example": "Basic Example",
12
- "clone_mapper": "Clone mapper",
13
- "customization": "Customization",
14
- "exclude_association": "Exclude Association",
15
- "finalize": "Finalization",
16
- "Finalize": "Finalize",
17
- "from_v02_to_v10": "From v0.2.x to v1.0.0",
18
- "implicit_cloner": "Implicit Cloner",
19
- "include_association": "Include Association",
20
- "init_as": "Initialize Cloning Target",
21
- "Init As": "Init As",
22
- "inline_configuration": "Inline Configuration",
23
- "installation": "Installation & Configuration",
24
- "nullify": "Nullify Attributes",
25
- "Nullify": "Nullify",
26
- "operation": "Operation",
27
- "overview": "Overview",
28
- "parameters": "Parameters",
29
- "sequel": "Sequel",
30
- "supported_adapters": "Supported Adapters",
31
- "testing": "Testing",
32
- "traits": "Traits",
33
- "HISTORY": "HISTORY",
34
- "README": "README",
35
- "readme": "readme",
36
- "CHANGES": "CHANGES",
37
- "LICENSE": "LICENSE",
38
- "CHANGELOG": "CHANGELOG",
39
- "CONTRIBUTING": "CONTRIBUTING",
40
- "History": "History",
41
- "Readme": "Readme",
42
- "extending-remarkable": "extending-remarkable",
43
- "local-third-party-project-testing": "local-third-party-project-testing",
44
- "publish": "publish",
45
- "testing-changes-on-Docusaurus-itself": "testing-changes-on-Docusaurus-itself",
46
- "CODE_OF_CONDUCT": "CODE_OF_CONDUCT",
47
- "2016-03-11-blog-post": "Blog Title",
48
- "2017-04-10-blog-post-two": "New Blog Post",
49
- "2017-09-25-testing-rss": "Adding RSS Support - RSS Truncation Test",
50
- "2017-09-26-adding-rss": "Adding RSS Support",
51
- "2017-10-24-new-version-1.0.0": "New Version 1.0.0",
52
- "doc1": "Latin-ish",
53
- "Example Page": "Example Page",
54
- "doc2": "document number 2",
55
- "doc3": "This is document number 3",
56
- "doc4": "Other Document",
57
- "doc5": "Fifth Document",
58
- "copy-sync": "copy-sync",
59
- "copy": "copy",
60
- "emptyDir-sync": "emptyDir-sync",
61
- "emptyDir": "emptyDir",
62
- "ensureDir-sync": "ensureDir-sync",
63
- "ensureDir": "ensureDir",
64
- "ensureFile-sync": "ensureFile-sync",
65
- "ensureFile": "ensureFile",
66
- "ensureLink-sync": "ensureLink-sync",
67
- "ensureLink": "ensureLink",
68
- "ensureSymlink-sync": "ensureSymlink-sync",
69
- "ensureSymlink": "ensureSymlink",
70
- "fs-read-write": "fs-read-write",
71
- "move-sync": "move-sync",
72
- "move": "move",
73
- "outputFile-sync": "outputFile-sync",
74
- "outputFile": "outputFile",
75
- "outputJson-sync": "outputJson-sync",
76
- "outputJson": "outputJson",
77
- "pathExists-sync": "pathExists-sync",
78
- "pathExists": "pathExists",
79
- "readJson-sync": "readJson-sync",
80
- "readJson": "readJson",
81
- "remove-sync": "remove-sync",
82
- "remove": "remove",
83
- "writeJson-sync": "writeJson-sync",
84
- "writeJson": "writeJson",
85
- "changelog": "changelog",
86
- "http_signing": "http_signing",
87
- "Changelog": "Changelog",
88
- "license": "license",
89
- "ERROR-HANDLING": "ERROR-HANDLING",
90
- "LIMITS": "LIMITS",
91
- "block-bq-flat": "block-bq-flat",
92
- "block-bq-nested": "block-bq-nested",
93
- "block-code": "block-code",
94
- "block-fences": "block-fences",
95
- "block-heading": "block-heading",
96
- "block-hr": "block-hr",
97
- "block-html": "block-html",
98
- "block-lheading": "block-lheading",
99
- "block-list-flat": "block-list-flat",
100
- "block-list-nested": "block-list-nested",
101
- "block-ref-flat": "block-ref-flat",
102
- "block-ref-nested": "block-ref-nested",
103
- "block-tables-large": "block-tables-large",
104
- "block-tables": "block-tables",
105
- "inline-autolink": "inline-autolink",
106
- "inline-backticks": "inline-backticks",
107
- "inline-em-flat": "inline-em-flat",
108
- "inline-em-nested": "inline-em-nested",
109
- "inline-em-worst": "inline-em-worst",
110
- "inline-entity": "inline-entity",
111
- "inline-escape": "inline-escape",
112
- "inline-html": "inline-html",
113
- "inline-links-flat": "inline-links-flat",
114
- "inline-links-nested": "inline-links-nested",
115
- "inline-newlines-large": "inline-newlines-large",
116
- "inline-newlines": "inline-newlines",
117
- "rawtabs": "rawtabs",
118
- "example": "example",
119
- "parser": "parser",
120
- "parsing_block": "parsing_block",
121
- "parsing_core": "parsing_core",
122
- "parsing_inline": "parsing_inline",
123
- "plugins": "plugins",
124
- "renderer": "renderer",
125
- "AUTHORS": "AUTHORS",
126
- "PULL_REQUEST_TEMPLATE": "PULL_REQUEST_TEMPLATE",
127
- "Docs": "Docs",
128
- "GitHub": "GitHub",
129
- "Getting Started": "Getting Started",
130
- "API": "API",
131
- "Adapters": "Adapters",
132
- "Advanced Options": "Advanced Options",
133
- "Upgrade Notes": "Upgrade Notes"
134
- },
135
- "pages-strings": {
136
- "Help Translate|recruit community translators for your project": "Help Translate",
137
- "Edit this Doc|recruitment message asking to edit the doc source": "Edit",
138
- "Translate this Doc|recruitment message asking to translate the docs": "Translate"
139
- }
140
- }
@@ -1,14 +0,0 @@
1
- {
2
- "scripts": {
3
- "examples": "docusaurus-examples",
4
- "start": "docusaurus-start",
5
- "build": "docusaurus-build",
6
- "publish-gh-pages": "docusaurus-publish",
7
- "write-translations": "docusaurus-write-translations",
8
- "version": "docusaurus-version",
9
- "rename-version": "docusaurus-rename-version"
10
- },
11
- "devDependencies": {
12
- "docusaurus": "^1.0.5"
13
- }
14
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * Copyright (c) 2017-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- const React = require('react');
9
-
10
- const CompLibrary = require('../../core/CompLibrary.js');
11
- const Container = CompLibrary.Container;
12
- const GridBlock = CompLibrary.GridBlock;
13
-
14
- const siteConfig = require(process.cwd() + '/siteConfig.js');
15
-
16
- class Help extends React.Component {
17
- render() {
18
- const supportLinks = [
19
- {
20
- content:
21
- 'Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)',
22
- title: 'Browse Docs',
23
- },
24
- {
25
- content: 'Ask questions about the documentation and project',
26
- title: 'Join the community',
27
- },
28
- {
29
- content: "Find out what's new with this project",
30
- title: 'Stay up to date',
31
- },
32
- ];
33
-
34
- return (
35
- <div className="docMainWrapper wrapper">
36
- <Container className="mainContainer documentContainer postContainer">
37
- <div className="post">
38
- <header className="postHeader">
39
- <h2>Need help?</h2>
40
- </header>
41
- <p>This project is maintained by a dedicated group of people.</p>
42
- <GridBlock contents={supportLinks} layout="threeColumn" />
43
- </div>
44
- </Container>
45
- </div>
46
- );
47
- }
48
- }
49
-
50
- module.exports = Help;
@@ -1,231 +0,0 @@
1
- /**
2
- * Copyright (c) 2017-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- const React = require('react');
9
-
10
- const CompLibrary = require('../../core/CompLibrary.js');
11
- const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
12
- const Container = CompLibrary.Container;
13
- const GridBlock = CompLibrary.GridBlock;
14
-
15
- const siteConfig = require(process.cwd() + '/siteConfig.js');
16
-
17
- function imgUrl(img) {
18
- return siteConfig.baseUrl + 'img/' + img;
19
- }
20
-
21
- function docUrl(doc, language) {
22
- return siteConfig.baseUrl + 'docs/' + (language ? language + '/' : '') + doc;
23
- }
24
-
25
- function pageUrl(page, language) {
26
- return siteConfig.baseUrl + (language ? language + '/' : '') + page;
27
- }
28
-
29
- class Button extends React.Component {
30
- render() {
31
- return (
32
- <div className="pluginWrapper buttonWrapper">
33
- <a className={`button ${this.props.className}`} href={this.props.href} target={this.props.target}>
34
- {this.props.children}
35
- </a>
36
- </div>
37
- );
38
- }
39
- }
40
-
41
- Button.defaultProps = {
42
- target: '_self',
43
- className: '',
44
- };
45
-
46
- const SplashContainer = props => (
47
- <div className="homeContainer">
48
- <div className="homeSplashFade">
49
- <div className="wrapper homeWrapper">{props.children}</div>
50
- </div>
51
- </div>
52
- );
53
-
54
- const Logo = props => (
55
- <div className="projectLogo">
56
- </div>
57
- );
58
-
59
- const ProjectTitle = props => (
60
- <h2 className="projectTitle">
61
- <span className="projectTitleName">{siteConfig.title}</span>
62
- <small>{siteConfig.tagline}</small>
63
- <p>
64
- <a href="https://badge.fury.io/rb/clowne"><image title="Gem Version" src="https://badge.fury.io/rb/clowne.svg" /></a>
65
- </p>
66
- </h2>
67
- );
68
-
69
- const PromoSection = props => (
70
- <div className="section promoSection">
71
- <div className="promoRow">
72
- <div className="pluginRowBlock">{props.children}</div>
73
- </div>
74
- </div>
75
- );
76
-
77
- class HomeSplash extends React.Component {
78
- render() {
79
- let language = this.props.language || '';
80
- return (
81
- <SplashContainer>
82
- <div className="inner">
83
- <ProjectTitle />
84
- <PromoSection>
85
- <Button href={docUrl("installation.html")}>Getting Started</Button>
86
- </PromoSection>
87
- </div>
88
- </SplashContainer>
89
- );
90
- }
91
- }
92
-
93
- const Block = props => (
94
- <Container
95
- padding={props.padding}
96
- id={props.id}
97
- background={props.background}>
98
- <GridBlock align="center" contents={props.children} layout={props.layout} />
99
- </Container>
100
- );
101
-
102
- Block.defaultProps = {
103
- padding: ['bottom', 'top'],
104
- };
105
-
106
- const Features = props => (
107
- <Block layout="twoColumn" padding={['bottom']}>
108
- {[
109
- {
110
- content: 'Rich DSL out-of-the-box',
111
- imageAlign: 'top',
112
- title: 'Powerful',
113
- },
114
- {
115
- content: 'Supports ActiveRecord and Sequel<br/><small><em>ROM is coming soon!</em></small>',
116
- imageAlign: 'top',
117
- title: 'ORM adapters',
118
- },
119
- {
120
- content: 'Easy to extend for your needs',
121
- imageAlign: 'top',
122
- title: 'Customizable',
123
- },
124
- {
125
- content: "It's just Ruby without any dependency",
126
- imageAlign: 'top',
127
- title: 'Rails-free',
128
- },
129
- ]}
130
- </Block>
131
- );
132
-
133
- const FeatureCallout = props => (
134
- <div
135
- className="productShowcaseSection paddingBottom"
136
- style={{textAlign: 'center'}}>
137
- <h2>Feature Callout</h2>
138
- <MarkdownBlock>These are features of this project</MarkdownBlock>
139
- </div>
140
- );
141
-
142
- const LearnHow = props => (
143
- <Block background="light">
144
- {[
145
- {
146
- content: 'Talk about learning how to use this',
147
- image: imgUrl('docusaurus.svg'),
148
- imageAlign: 'right',
149
- title: 'Learn How',
150
- },
151
- ]}
152
- </Block>
153
- );
154
-
155
- const TryOut = props => (
156
- <Block id="try">
157
- {[
158
- {
159
- content: 'Talk about trying this out',
160
- image: imgUrl('docusaurus.svg'),
161
- imageAlign: 'left',
162
- title: 'Try it Out',
163
- },
164
- ]}
165
- </Block>
166
- );
167
-
168
- const Description = props => (
169
- <Block background="dark">
170
- {[
171
- {
172
- content: 'This is another description of how this project is useful',
173
- image: imgUrl('docusaurus.svg'),
174
- imageAlign: 'right',
175
- title: 'Description',
176
- },
177
- ]}
178
- </Block>
179
- );
180
-
181
- const Showcase = props => {
182
- if ((siteConfig.users || []).length === 0) {
183
- return null;
184
- }
185
- const showcase = siteConfig.users
186
- .filter(user => {
187
- return user.pinned;
188
- })
189
- .map((user, i) => {
190
- return (
191
- <a href={user.infoLink} key={i}>
192
- <img src={user.image} title={user.caption} />
193
- </a>
194
- );
195
- });
196
-
197
- return (
198
- <div className="productShowcaseSection paddingBottom">
199
- <h2>{"Who's Using This?"}</h2>
200
- <p>This project is used by all these people</p>
201
- <div className="logos">{showcase}</div>
202
- <div className="more-users">
203
- <a className="button" href={pageUrl('users.html', props.language)}>
204
- More {siteConfig.title} Users
205
- </a>
206
- </div>
207
- </div>
208
- );
209
- };
210
-
211
- class Index extends React.Component {
212
- render() {
213
- let language = this.props.language || '';
214
-
215
- return (
216
- <div>
217
- <HomeSplash language={language} />
218
- <div className="mainContainer">
219
- <Features />
220
- {/* <FeatureCallout /> */}
221
- {/* <LearnHow /> */}
222
- {/* <TryOut /> */}
223
- {/* <Description /> */}
224
- {/* <Showcase language={language} /> */}
225
- </div>
226
- </div>
227
- );
228
- }
229
- }
230
-
231
- module.exports = Index;
@@ -1,47 +0,0 @@
1
- /**
2
- * Copyright (c) 2017-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- const React = require('react');
9
-
10
- const CompLibrary = require('../../core/CompLibrary.js');
11
- const Container = CompLibrary.Container;
12
-
13
- const siteConfig = require(process.cwd() + '/siteConfig.js');
14
-
15
- class Users extends React.Component {
16
- render() {
17
- const showcase = siteConfig.users.map((user, i) => {
18
- return (
19
- <a href={user.infoLink} key={i}>
20
- <img src={user.image} title={user.caption} />
21
- </a>
22
- );
23
- });
24
-
25
- return (
26
- <div className="mainContainer">
27
- <Container padding={['bottom', 'top']}>
28
- <div className="showcaseSection">
29
- <div className="prose">
30
- <h1>Who's Using This?</h1>
31
- <p>This project is used by many folks</p>
32
- </div>
33
- <div className="logos">{showcase}</div>
34
- <p>Are you using this project?</p>
35
- <a
36
- href="https://github.com/facebook/docusaurus/edit/master/website/siteConfig.js"
37
- className="button">
38
- Add your company
39
- </a>
40
- </div>
41
- </Container>
42
- </div>
43
- );
44
- }
45
- }
46
-
47
- module.exports = Users;
@@ -1,37 +0,0 @@
1
- {
2
- "docs": {
3
- "Getting Started": [
4
- "installation",
5
- "basic_example",
6
- "overview",
7
- "alternatives"
8
- ],
9
- "API": [
10
- "operation",
11
- "include_association",
12
- "exclude_association",
13
- "nullify",
14
- "finalize",
15
- "after_persist",
16
- "init_as",
17
- "traits",
18
- "parameters"
19
- ],
20
- "Adapters": [
21
- "supported_adapters",
22
- "active_record",
23
- "sequel"
24
- ],
25
- "Advanced Options": [
26
- "implicit_cloner",
27
- "inline_configuration",
28
- "clone_mapper",
29
- "architecture",
30
- "testing",
31
- "customization"
32
- ],
33
- "Upgrade Notes": [
34
- "from_v02_to_v10"
35
- ]
36
- }
37
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * Copyright (c) 2017-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- const siteConfig = {
9
- title: 'Clowne' /* title for your website */,
10
- tagline: 'A flexible gem for cloning your models',
11
- url: 'http://clowne.evilmartians.io' /* your website url */,
12
- cname: 'clowne.evilmartians.io',
13
- baseUrl: '/' /* base url for your project */,
14
- customDocsPath: '../docs',
15
- projectName: 'clowne',
16
- headerLinks: [
17
- {doc: 'basic_example', label: 'Docs'},
18
- {href: 'https://github.com/palkan/clowne', label: 'GitHub'},
19
- ],
20
- users: [], /* users, */
21
- /* path to images for header/footer */
22
- // headerIcon: 'img/docusaurus.svg',
23
- favicon: 'img/favicon/favicon.ico',
24
- /* colors for website */
25
- colors: {
26
- primaryColor: '#9FA628', // '#ff5e5e'
27
- secondaryColor: '#e3e3e3',
28
- },
29
- // This copyright info is used in /core/Footer.js and blog rss/atom feeds.
30
- copyright:
31
- 'Copyright © ' +
32
- new Date().getFullYear() +
33
- ' Evil Martians',
34
- // organizationName: 'deltice', // or set an env variable ORGANIZATION_NAME
35
- highlight: {
36
- // Highlight.js theme to use for syntax highlighting in code blocks
37
- theme: 'atom-one-light',
38
- },
39
- scripts: ['https://buttons.github.io/buttons.js'],
40
- // You may provide arbitrary config keys to be used as needed by your template.
41
- repoUrl: 'https://github.com/palkan/clowne',
42
- gemUrl: 'https://rubygems.org/gems/clowne',
43
- gaTrackingId: 'UA-104346673-2',
44
- };
45
-
46
- module.exports = siteConfig;