panko_serializer 0.6.0 → 0.7.4
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 +4 -4
- data/.github/workflows/docs.yml +39 -0
- data/.github/workflows/ruby.yml +48 -0
- data/.gitignore +2 -1
- data/Gemfile +2 -2
- data/README.md +7 -7
- data/benchmarks/app.rb +1 -0
- data/benchmarks/bm_panko_json.rb +5 -1
- data/benchmarks/setup.rb +3 -1
- data/benchmarks/type_casts/bm_panko.rb +2 -2
- data/docs/.DS_Store +0 -0
- data/docs/README.md +195 -8
- data/docs/core/Footer.js +81 -0
- data/docs/{associations.md → docs/associations.md} +23 -5
- data/docs/{attributes.md → docs/attributes.md} +25 -13
- data/docs/{design-choices.md → docs/design-choices.md} +6 -2
- data/docs/{getting-started.md → docs/getting-started.md} +19 -2
- data/docs/docs/introduction.md +13 -0
- data/docs/{performance.md → docs/performance.md} +11 -7
- data/docs/{response-bag.md → docs/response-bag.md} +24 -1
- data/docs/i18n/en.json +50 -0
- data/docs/package-lock.json +9636 -0
- data/docs/package.json +14 -0
- data/docs/sidebars.json +15 -0
- data/docs/siteConfig.js +80 -0
- data/docs/static/.DS_Store +0 -0
- data/docs/static/css/custom.css +51 -0
- data/docs/static/img/favicon.ico +0 -0
- data/docs/static/img/oss_logo.png +0 -0
- data/docs/static/img/undraw_code_review.svg +1 -0
- data/docs/static/img/undraw_monitor.svg +1 -0
- data/docs/static/img/undraw_note_list.svg +1 -0
- data/docs/static/img/undraw_online.svg +1 -0
- data/docs/static/img/undraw_open_source.svg +1 -0
- data/docs/static/img/undraw_operating_system.svg +1 -0
- data/docs/static/img/undraw_react.svg +1 -0
- data/docs/static/img/undraw_tweetstorm.svg +1 -0
- data/docs/static/img/undraw_youtube_tutorial.svg +1 -0
- data/docs/static/index.html +14 -0
- data/ext/panko_serializer/attributes_writer/active_record.c +58 -16
- data/ext/panko_serializer/attributes_writer/attributes_writer.c +15 -3
- data/ext/panko_serializer/attributes_writer/attributes_writer.h +2 -1
- data/ext/panko_serializer/attributes_writer/common.h +1 -1
- data/ext/panko_serializer/attributes_writer/hash.c +12 -0
- data/ext/panko_serializer/attributes_writer/hash.h +9 -0
- data/ext/panko_serializer/attributes_writer/plain.c +2 -3
- data/ext/panko_serializer/attributes_writer/type_cast/type_cast.c +54 -21
- data/ext/panko_serializer/attributes_writer/type_cast/type_cast.h +1 -2
- data/ext/panko_serializer/panko_serializer.c +15 -7
- data/ext/panko_serializer/serialization_descriptor/serialization_descriptor.c +7 -10
- data/lib/panko/association.rb +1 -1
- data/lib/panko/object_writer.rb +8 -0
- data/lib/panko/response.rb +5 -4
- data/lib/panko/serializer.rb +5 -0
- data/lib/panko/version.rb +1 -1
- data/panko_serializer.gemspec +7 -7
- metadata +47 -23
- data/.travis.yml +0 -33
- data/docs/docpress.json +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cbaf86b0b95041f6f3387c8d82cc8ef1fa272549e50b5d3fdac2d13989f1a29
|
4
|
+
data.tar.gz: 41496c877bee39fa9fe7f136469ea260c1c60feeb25c6f95930b8c13a9055b3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c30cbbde27a0ff4cead7b0763c1a76d0d179053e7d913ac81594eedb50defee858792d0893e19a42bd5b5ea71e6c5e4ed2cc3371a2d48d1dce4d53737a4d584
|
7
|
+
data.tar.gz: 0dd1443b07977c1eea6457016f4db43d88fcf857ea607bf9064b72485e4f7d78e0ffcf39fe1f9b83456c0477da3988ee6a392730bfe84565d266816484e01589
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
3
|
+
|
4
|
+
name: Docs Publishing
|
5
|
+
|
6
|
+
on:
|
7
|
+
push:
|
8
|
+
branches: [ master ]
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
build:
|
12
|
+
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
env:
|
15
|
+
working_directory: 'docs/'
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v2
|
19
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
20
|
+
uses: actions/setup-node@v1
|
21
|
+
with:
|
22
|
+
node-version: '12.x'
|
23
|
+
|
24
|
+
- name: Install Dependencies
|
25
|
+
working-directory: ${{ env.working_directory }}
|
26
|
+
run: npm install
|
27
|
+
|
28
|
+
- name: Install SSH Client 🔑
|
29
|
+
uses: webfactory/ssh-agent@v0.2.0
|
30
|
+
with:
|
31
|
+
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
|
32
|
+
|
33
|
+
- name: Publish
|
34
|
+
working-directory: ${{ env.working_directory }}
|
35
|
+
run: |
|
36
|
+
git config --global user.email "action@github.com"
|
37
|
+
git config --global user.name "GitHub Action"
|
38
|
+
GIT_USER=panko-serializer CURRENT_BRANCH=master USE_SSH=true npm run publish-gh-pages
|
39
|
+
|
@@ -0,0 +1,48 @@
|
|
1
|
+
name: Panko Serializer CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
ruby: [ '2.5', '2.6', '2.7']
|
13
|
+
rails: ['5.2.0', '6.0.0', '6.1.0rc1']
|
14
|
+
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
18
|
+
uses: actions/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
|
22
|
+
- name: Install deps
|
23
|
+
run: |
|
24
|
+
sudo apt update -y
|
25
|
+
sudo apt install -y libsqlite3-dev
|
26
|
+
|
27
|
+
- name: Gems Cache
|
28
|
+
id: gem-cache
|
29
|
+
uses: actions/cache@v1
|
30
|
+
with:
|
31
|
+
path: vendor/bundle
|
32
|
+
key: ${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.rails }}-gem
|
33
|
+
restore-keys: |
|
34
|
+
${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.rails }}-gem
|
35
|
+
|
36
|
+
- name: Install gems
|
37
|
+
env:
|
38
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
39
|
+
run: |
|
40
|
+
gem install bundler
|
41
|
+
bundle config set path 'vendor/bundle'
|
42
|
+
bundle check || bundle install --jobs 4 --retry 3
|
43
|
+
|
44
|
+
- name: Compile & test
|
45
|
+
env:
|
46
|
+
RAILS_VERSION: ${{ matrix.rails }}
|
47
|
+
run: |
|
48
|
+
bundle exec rake
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
# Panko
|
2
2
|
|
3
|
-
|
3
|
+

|
4
4
|
|
5
5
|
Panko is library which is inspired by ActiveModelSerializers 0.9 for serializing ActiveRecord/Ruby objects to JSON strings, fast.
|
6
6
|
|
7
|
-
To achieve it's [performance](https://
|
7
|
+
To achieve it's [performance](https://panko.dev/docs/performance.html):
|
8
8
|
|
9
|
-
* Oj - Panko relies Oj since it's fast and allow to
|
9
|
+
* Oj - Panko relies Oj since it's fast and allow to serialize incrementally using `Oj::StringWriter`
|
10
10
|
* Serialization Descriptor - Panko computes most of the metadata ahead of time, to save time later in serialization.
|
11
|
-
* Type casting — Panko does type casting by it's self, instead of relying ActiveRecord.
|
11
|
+
* Type casting — Panko does type casting by it's self, instead of relying on ActiveRecord.
|
12
12
|
|
13
|
-
To dig deeper about the performance choices, read [Design Choices](https://
|
13
|
+
To dig deeper about the performance choices, read [Design Choices](https://panko.dev/docs/design-choices.html).
|
14
14
|
|
15
15
|
|
16
16
|
Support
|
17
17
|
-------
|
18
18
|
|
19
|
-
- [Documentation](https://
|
20
|
-
- [Getting Started](https://
|
19
|
+
- [Documentation](https://panko.dev/docs)
|
20
|
+
- [Getting Started](https://panko.dev/docs/getting-started.html)
|
21
21
|
- Join our [slack community](https://pankoserializer.herokuapp.com/)
|
22
22
|
|
23
23
|
License
|
data/benchmarks/app.rb
CHANGED
data/benchmarks/bm_panko_json.rb
CHANGED
@@ -12,6 +12,10 @@ class PostFastSerializer < Panko::Serializer
|
|
12
12
|
attributes :id, :body, :title, :author_id, :created_at
|
13
13
|
end
|
14
14
|
|
15
|
+
class PostFastWithJsonSerializer < Panko::Serializer
|
16
|
+
attributes :id, :body, :title, :author_id, :created_at, :data
|
17
|
+
end
|
18
|
+
|
15
19
|
class PostFastWithMethodCallSerializer < Panko::Serializer
|
16
20
|
attributes :id, :body, :title, :author_id, :method_call
|
17
21
|
|
@@ -32,7 +36,6 @@ class AuthorWithHasManyFastSerializer < Panko::Serializer
|
|
32
36
|
has_many :posts, serializer: PostFastSerializer
|
33
37
|
end
|
34
38
|
|
35
|
-
|
36
39
|
def benchmark(prefix, serializer, options = {})
|
37
40
|
data = Benchmark.data
|
38
41
|
posts = data[:all]
|
@@ -54,6 +57,7 @@ def benchmark(prefix, serializer, options = {})
|
|
54
57
|
end
|
55
58
|
|
56
59
|
benchmark "Simple", PostFastSerializer
|
60
|
+
benchmark "SimpleWithJson", PostFastWithJsonSerializer
|
57
61
|
benchmark "HasOne", PostWithHasOneFastSerializer
|
58
62
|
benchmark "SimpleWithMethodCall", PostFastWithMethodCallSerializer
|
59
63
|
benchmark "Except", PostWithHasOneFastSerializer, except: [:title]
|
data/benchmarks/setup.rb
CHANGED
@@ -25,6 +25,7 @@ ActiveRecord::Schema.define do
|
|
25
25
|
t.text :body
|
26
26
|
t.string :title
|
27
27
|
t.references :author
|
28
|
+
t.json :data
|
28
29
|
t.timestamps(null: false)
|
29
30
|
end
|
30
31
|
end
|
@@ -47,7 +48,8 @@ Post.transaction do
|
|
47
48
|
Post.create(
|
48
49
|
body: "something about how password restrictions are evil, and less secure, and with the math to prove it.",
|
49
50
|
title: "Your bank is does not know how to do security",
|
50
|
-
author: Author.create(name: "Preston Sego")
|
51
|
+
author: Author.create(name: "Preston Sego"),
|
52
|
+
data: { a: 1, b: 2, c: 3 }
|
51
53
|
)
|
52
54
|
end
|
53
55
|
end
|
@@ -59,10 +59,10 @@ if ENV["RAILS_VERSION"].start_with? "4.2"
|
|
59
59
|
end
|
60
60
|
|
61
61
|
if check_if_exists "ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Json"
|
62
|
-
panko_type_convert ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Json, '{"a":1}', {a:1}
|
62
|
+
panko_type_convert ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Json, '{"a":1}', '{"a":1}'
|
63
63
|
end
|
64
64
|
if check_if_exists "ActiveRecord::Type::Json"
|
65
|
-
panko_type_convert ActiveRecord::Type::Json, '{"a":1}', {a:1}
|
65
|
+
panko_type_convert ActiveRecord::Type::Json, '{"a":1}', '{"a":1}'
|
66
66
|
end
|
67
67
|
db_panko_time
|
68
68
|
utc_panko_time
|
data/docs/.DS_Store
ADDED
Binary file
|
data/docs/README.md
CHANGED
@@ -1,11 +1,198 @@
|
|
1
|
-
|
2
|
-
* [Getting Started](getting-started.md)
|
3
|
-
* Reference
|
4
|
-
* [Attributes](attributes.md)
|
5
|
-
* [Associations](associations.md)
|
6
|
-
* [Response bag](response-bag.md)
|
7
|
-
* [Performance](performance.md)
|
8
|
-
* [Design Choices](design-choices.md)
|
1
|
+
This website was created with [Docusaurus](https://docusaurus.io/).
|
9
2
|
|
3
|
+
# What's In This Document
|
10
4
|
|
5
|
+
- [Get Started in 5 Minutes](#get-started-in-5-minutes)
|
6
|
+
- [Directory Structure](#directory-structure)
|
7
|
+
- [Editing Content](#editing-content)
|
8
|
+
- [Adding Content](#adding-content)
|
9
|
+
- [Full Documentation](#full-documentation)
|
11
10
|
|
11
|
+
# Get Started in 5 Minutes
|
12
|
+
|
13
|
+
1. Make sure all the dependencies for the website are installed:
|
14
|
+
|
15
|
+
```sh
|
16
|
+
# Install dependencies
|
17
|
+
$ yarn
|
18
|
+
```
|
19
|
+
|
20
|
+
2. Run your dev server:
|
21
|
+
|
22
|
+
```sh
|
23
|
+
# Start the site
|
24
|
+
$ yarn start
|
25
|
+
```
|
26
|
+
|
27
|
+
## Directory Structure
|
28
|
+
|
29
|
+
Your project file structure should look something like this
|
30
|
+
|
31
|
+
```
|
32
|
+
my-docusaurus/
|
33
|
+
docs/
|
34
|
+
doc-1.md
|
35
|
+
doc-2.md
|
36
|
+
doc-3.md
|
37
|
+
website/
|
38
|
+
blog/
|
39
|
+
2016-3-11-oldest-post.md
|
40
|
+
2017-10-24-newest-post.md
|
41
|
+
core/
|
42
|
+
node_modules/
|
43
|
+
pages/
|
44
|
+
static/
|
45
|
+
css/
|
46
|
+
img/
|
47
|
+
package.json
|
48
|
+
sidebars.json
|
49
|
+
siteConfig.js
|
50
|
+
```
|
51
|
+
|
52
|
+
# Editing Content
|
53
|
+
|
54
|
+
## Editing an existing docs page
|
55
|
+
|
56
|
+
Edit docs by navigating to `docs/` and editing the corresponding document:
|
57
|
+
|
58
|
+
`docs/doc-to-be-edited.md`
|
59
|
+
|
60
|
+
```markdown
|
61
|
+
---
|
62
|
+
id: page-needs-edit
|
63
|
+
title: This Doc Needs To Be Edited
|
64
|
+
---
|
65
|
+
|
66
|
+
Edit me...
|
67
|
+
```
|
68
|
+
|
69
|
+
For more information about docs, click [here](https://docusaurus.io/docs/en/navigation)
|
70
|
+
|
71
|
+
## Editing an existing blog post
|
72
|
+
|
73
|
+
Edit blog posts by navigating to `website/blog` and editing the corresponding post:
|
74
|
+
|
75
|
+
`website/blog/post-to-be-edited.md`
|
76
|
+
|
77
|
+
```markdown
|
78
|
+
---
|
79
|
+
id: post-needs-edit
|
80
|
+
title: This Blog Post Needs To Be Edited
|
81
|
+
---
|
82
|
+
|
83
|
+
Edit me...
|
84
|
+
```
|
85
|
+
|
86
|
+
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
|
87
|
+
|
88
|
+
# Adding Content
|
89
|
+
|
90
|
+
## Adding a new docs page to an existing sidebar
|
91
|
+
|
92
|
+
1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`:
|
93
|
+
|
94
|
+
```md
|
95
|
+
---
|
96
|
+
id: newly-created-doc
|
97
|
+
title: This Doc Needs To Be Edited
|
98
|
+
---
|
99
|
+
|
100
|
+
My new content here..
|
101
|
+
```
|
102
|
+
|
103
|
+
1. Refer to that doc's ID in an existing sidebar in `website/sidebars.json`:
|
104
|
+
|
105
|
+
```javascript
|
106
|
+
// Add newly-created-doc to the Getting Started category of docs
|
107
|
+
{
|
108
|
+
"docs": {
|
109
|
+
"Getting Started": [
|
110
|
+
"quick-start",
|
111
|
+
"newly-created-doc" // new doc here
|
112
|
+
],
|
113
|
+
...
|
114
|
+
},
|
115
|
+
...
|
116
|
+
}
|
117
|
+
```
|
118
|
+
|
119
|
+
For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation)
|
120
|
+
|
121
|
+
## Adding a new blog post
|
122
|
+
|
123
|
+
1. Make sure there is a header link to your blog in `website/siteConfig.js`:
|
124
|
+
|
125
|
+
`website/siteConfig.js`
|
126
|
+
|
127
|
+
```javascript
|
128
|
+
headerLinks: [
|
129
|
+
...
|
130
|
+
{ blog: true, label: 'Blog' },
|
131
|
+
...
|
132
|
+
]
|
133
|
+
```
|
134
|
+
|
135
|
+
2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`:
|
136
|
+
|
137
|
+
`website/blog/2018-05-21-New-Blog-Post.md`
|
138
|
+
|
139
|
+
```markdown
|
140
|
+
---
|
141
|
+
author: Frank Li
|
142
|
+
authorURL: https://twitter.com/foobarbaz
|
143
|
+
authorFBID: 503283835
|
144
|
+
title: New Blog Post
|
145
|
+
---
|
146
|
+
|
147
|
+
Lorem Ipsum...
|
148
|
+
```
|
149
|
+
|
150
|
+
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
|
151
|
+
|
152
|
+
## Adding items to your site's top navigation bar
|
153
|
+
|
154
|
+
1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`:
|
155
|
+
|
156
|
+
`website/siteConfig.js`
|
157
|
+
|
158
|
+
```javascript
|
159
|
+
{
|
160
|
+
headerLinks: [
|
161
|
+
...
|
162
|
+
/* you can add docs */
|
163
|
+
{ doc: 'my-examples', label: 'Examples' },
|
164
|
+
/* you can add custom pages */
|
165
|
+
{ page: 'help', label: 'Help' },
|
166
|
+
/* you can add external links */
|
167
|
+
{ href: 'https://github.com/facebook/docusaurus', label: 'GitHub' },
|
168
|
+
...
|
169
|
+
],
|
170
|
+
...
|
171
|
+
}
|
172
|
+
```
|
173
|
+
|
174
|
+
For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation)
|
175
|
+
|
176
|
+
## Adding custom pages
|
177
|
+
|
178
|
+
1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`:
|
179
|
+
1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element:
|
180
|
+
|
181
|
+
`website/siteConfig.js`
|
182
|
+
|
183
|
+
```javascript
|
184
|
+
{
|
185
|
+
headerLinks: [
|
186
|
+
...
|
187
|
+
{ page: 'my-new-custom-page', label: 'My New Custom Page' },
|
188
|
+
...
|
189
|
+
],
|
190
|
+
...
|
191
|
+
}
|
192
|
+
```
|
193
|
+
|
194
|
+
For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages).
|
195
|
+
|
196
|
+
# Full Documentation
|
197
|
+
|
198
|
+
Full documentation can be found on the [website](https://docusaurus.io/).
|
data/docs/core/Footer.js
ADDED
@@ -0,0 +1,81 @@
|
|
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
|
+
const docsUrl = this.props.config.docsUrl;
|
14
|
+
const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`;
|
15
|
+
return `${baseUrl}${docsPart}${doc}`;
|
16
|
+
}
|
17
|
+
|
18
|
+
pageUrl(doc, language) {
|
19
|
+
const baseUrl = this.props.config.baseUrl;
|
20
|
+
return baseUrl + (language ? `${language}/` : '') + doc;
|
21
|
+
}
|
22
|
+
|
23
|
+
render() {
|
24
|
+
return (
|
25
|
+
<footer className="nav-footer" id="footer">
|
26
|
+
<section className="sitemap">
|
27
|
+
<a href={this.props.config.baseUrl} className="nav-home">
|
28
|
+
{this.props.config.footerIcon && (
|
29
|
+
<img
|
30
|
+
src={this.props.config.baseUrl + this.props.config.footerIcon}
|
31
|
+
alt={this.props.config.title}
|
32
|
+
width="66"
|
33
|
+
height="58"
|
34
|
+
/>
|
35
|
+
)}
|
36
|
+
</a>
|
37
|
+
<div>
|
38
|
+
<h5>Docs</h5>
|
39
|
+
<a href={this.docUrl('getting-started.html', this.props.language)}>
|
40
|
+
Getting Started
|
41
|
+
</a>
|
42
|
+
<a href={this.docUrl('attributes.html', this.props.language)}>
|
43
|
+
Guides
|
44
|
+
</a>
|
45
|
+
<a href={this.docUrl('performance.html', this.props.language)}>
|
46
|
+
Performance
|
47
|
+
</a>
|
48
|
+
</div>
|
49
|
+
<div>
|
50
|
+
<h5>More</h5>
|
51
|
+
<a href="https://github.com/panko-serializer/panko_serializer">GitHub</a>
|
52
|
+
<a href="https://pankoserializer.herokuapp.com/">Slack</a>
|
53
|
+
<a
|
54
|
+
className="github-button"
|
55
|
+
href={this.props.config.repoUrl}
|
56
|
+
data-icon="octicon-star"
|
57
|
+
data-count-href="/panko-serializer/panko_serializer/stargazers"
|
58
|
+
data-show-count="true"
|
59
|
+
data-count-aria-label="# stargazers on GitHub"
|
60
|
+
aria-label="Star this project on GitHub">
|
61
|
+
Star
|
62
|
+
</a>
|
63
|
+
{this.props.config.twitterUsername && (
|
64
|
+
<div className="social">
|
65
|
+
<a
|
66
|
+
href={`https://twitter.com/${this.props.config.twitterUsername}`}
|
67
|
+
className="twitter-follow-button">
|
68
|
+
Follow @{this.props.config.twitterUsername}
|
69
|
+
</a>
|
70
|
+
</div>
|
71
|
+
)}
|
72
|
+
</div>
|
73
|
+
</section>
|
74
|
+
|
75
|
+
<section className="copyright">{this.props.config.copyright}</section>
|
76
|
+
</footer>
|
77
|
+
);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
module.exports = Footer;
|