google-cloud-core 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f32ca008375d4ef2bcb7390f0e83552cfef3bc17742071d204a7fc95e874959b
4
- data.tar.gz: 88ac872ed434f61e756a2804eff44692b0443b8f3a495db6412a81d70ac033ed
3
+ metadata.gz: cd0f1846cebd29a7c58b48ebaee3ee46f3cb61110945d284090be9810843d929
4
+ data.tar.gz: 2783d38fe7918b7815a9b503e6e243077ba223d4f97b4797cf0a31ad88a41d04
5
5
  SHA512:
6
- metadata.gz: 58850905b09f8ee7eac62a0c9fe54533b25d7c782f69347c16726bda05d1838991d2b7550717dd1378b96012914ccd12e426dc53e05cfda9411eb82558991dd7
7
- data.tar.gz: b0538835819e1522d59de64d11ba8ed99ac33b26bf46b589237947821687f4a45f0324b459726c7500644c57971ad1bfd358daf9db591e173bd1ce5ab8e2db99
6
+ metadata.gz: 328d14c66bcef6e476edb13fa7193a0ffd681613cff6af69752b4a0d4c60e967565633305f7543dfe98bb95b3e36366e537697f73011a3fad21452be1bdc3f54
7
+ data.tar.gz: 875e6857eb51ff76ba18fa720fe929353b1feb31d179aa99bc17dc6ab78295145ccf0dbcded94392dd606b37115eba81291b8e18c5da3dcc43c1a1c54f294678
@@ -0,0 +1,41 @@
1
+ ## With `google-cloud-ruby`
2
+
3
+ With `google-cloud-ruby` it's incredibly easy to get authenticated and start using Google's APIs. You can set your credentials on a global basis as well as on a per-API basis.
4
+
5
+ ### Google Cloud Platform environments
6
+
7
+ While running on Google Cloud Platform environments such as Google Compute Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed. The **Project ID** and **Credentials** and are discovered automatically. Code should be written as if already authenticated.
8
+
9
+ ### Project and Credential Lookup
10
+
11
+ The google-cloud library aims to make authentication as simple as possible, and provides several mechanisms to configure your system without providing **Project ID** and **Service Account Credentials** directly in code.
12
+
13
+ **Project ID** is discovered in the following order:
14
+
15
+ 1. Specify project ID in code
16
+ 2. Discover project ID in environment variables
17
+ 3. Discover GCE project ID
18
+
19
+ **Credentials** are discovered in the following order:
20
+
21
+ 1. Specify credentials in code
22
+ 2. Discover credentials path in environment variables
23
+ 3. Discover credentials JSON in environment variables
24
+ 4. Discover credentials file in the Cloud SDK's path
25
+ 5. Discover GCE credentials
26
+
27
+ ### Environment Variables
28
+
29
+ The **Project ID** and **Credentials JSON** can be placed in environment variables instead of declaring them directly in code. Each service has its own environment variable, allowing for different service accounts to be used for different services. The path to the **Credentials JSON** file can be stored in the environment variable, or the **Credentials JSON** itself can be stored for environments such as Docker containers where writing files is difficult or not encouraged.
30
+
31
+ Here are the environment variables (in the order they are checked) for project ID:
32
+
33
+ 1. `GOOGLE_CLOUD_PROJECT`
34
+
35
+ Here are the environment variables (in the order they are checked) for credentials:
36
+
37
+ 1. `GOOGLE_CLOUD_KEYFILE` - Path to JSON file
38
+ 2. `GOOGLE_CLOUD_KEYFILE_JSON` - JSON contents
39
+
40
+
41
+
@@ -0,0 +1,40 @@
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 reject
24
+ comments, commits, code, wiki edits, issues, and other contributions that are
25
+ not aligned to this Code of Conduct. By adopting this Code of Conduct, project
26
+ maintainers commit themselves to fairly and consistently applying these
27
+ principles to every aspect of managing this project. Project maintainers who do
28
+ not follow or enforce the Code of Conduct may be permanently removed from the
29
+ project team.
30
+
31
+ This code of conduct applies both within project spaces and in public spaces
32
+ when an individual is representing the project or its community.
33
+
34
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
35
+ reported by opening an issue or contacting one or more of the project
36
+ maintainers.
37
+
38
+ This Code of Conduct is adapted from the [Contributor
39
+ Covenant](http://contributor-covenant.org), version 1.2.0, available at
40
+ [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
@@ -0,0 +1,141 @@
1
+ # Contributing to Google Cloud
2
+
3
+ 1. **Sign one of the contributor license agreements below.**
4
+ 2. Fork the repo, develop and test your code changes.
5
+ 3. Send a pull request.
6
+
7
+ ## Contributor License Agreements
8
+
9
+ Before we can accept your pull requests you'll need to sign a Contributor
10
+ License Agreement (CLA):
11
+
12
+ - **If you are an individual writing original source code** and **you own the
13
+ intellectual property**, then you'll need to sign an [individual
14
+ CLA](https://developers.google.com/open-source/cla/individual).
15
+ - **If you work for a company that wants to allow you to contribute your work**,
16
+ then you'll need to sign a [corporate
17
+ CLA](https://developers.google.com/open-source/cla/corporate).
18
+
19
+ You can sign these electronically (just scroll to the bottom). After that, we'll
20
+ be able to accept your pull requests.
21
+
22
+ ## Setup
23
+
24
+ In order to use the google-cloud console and run the project's tests,
25
+ there is a small amount of setup:
26
+
27
+ 1. Install Ruby. google-cloud requires Ruby 2.3+. You may choose to
28
+ manage your Ruby and gem installations with [RVM](https://rvm.io/),
29
+ [rbenv](https://github.com/rbenv/rbenv), or
30
+ [chruby](https://github.com/postmodern/chruby).
31
+
32
+ 2. Install [Bundler](http://bundler.io/).
33
+
34
+ ```sh
35
+ $ gem install bundler
36
+ ```
37
+
38
+ 3. Install the top-level project dependencies.
39
+
40
+ ```sh
41
+ $ bundle install
42
+ ```
43
+
44
+ 4. Install the Google Cloud dependencies.
45
+
46
+ ```sh
47
+ $ cd google-cloud-core/
48
+ $ bundle exec rake bundleupdate
49
+ ```
50
+
51
+ ## Console
52
+
53
+ In order to run code interactively, you can automatically load
54
+ google-cloud and its dependencies in IRB. This requires that your
55
+ developer environment has already been configured by following the steps
56
+ described in the {file:AUTHENTICATION.md Authentication Guide}. An IRB console
57
+ can be created with:
58
+
59
+ ```sh
60
+ $ cd google-cloud-core/
61
+ $ bundle exec rake console
62
+ ```
63
+
64
+ ## Google Cloud Tests
65
+
66
+ Tests are very important part of google-cloud. All contributions
67
+ should include tests that ensure the contributed code behaves as expected.
68
+
69
+ To run the unit tests, documentation tests, and code style checks together for a
70
+ package:
71
+
72
+ ``` sh
73
+ $ cd google-cloud-core/
74
+ $ bundle exec rake ci
75
+ ```
76
+
77
+ To run the command above, plus all acceptance tests, use `rake ci:acceptance` or
78
+ its handy alias, `rake ci:a`.
79
+
80
+ ### Google Cloud Unit Tests
81
+
82
+
83
+ The project uses the [minitest](https://github.com/seattlerb/minitest) library,
84
+ including [specs](https://github.com/seattlerb/minitest#specs),
85
+ [mocks](https://github.com/seattlerb/minitest#mocks) and
86
+ [minitest-autotest](https://github.com/seattlerb/minitest-autotest).
87
+
88
+ To run the Google Cloud unit tests:
89
+
90
+ ``` sh
91
+ $ cd google-cloud-core/
92
+ $ bundle exec rake test
93
+ ```
94
+
95
+ ### Google Cloud Documentation Tests
96
+
97
+ The project tests the code examples in the gem's
98
+ [YARD](https://github.com/lsegal/yard)-based documentation.
99
+
100
+ The example testing functions in a way that is very similar to unit testing, and
101
+ in fact the library providing it,
102
+ [yard-doctest](https://github.com/p0deje/yard-doctest), is based on the
103
+ project's unit test library, [minitest](https://github.com/seattlerb/minitest).
104
+
105
+ To run the Google Cloud documentation tests:
106
+
107
+ ``` sh
108
+ $ cd google-cloud-core/
109
+ $ bundle exec rake doctest
110
+ ```
111
+
112
+ If you add, remove or modify documentation examples when working on a pull
113
+ request, you may need to update the setup for the tests. The stubs and mocks
114
+ required to run the tests are located in `support/doctest_helper.rb`. Please
115
+ note that much of the setup is matched by the title of the
116
+ [`@example`](http://www.rubydoc.info/gems/yard/file/docs/Tags.md#example) tag.
117
+ If you alter an example's title, you may encounter breaking tests.
118
+
119
+ ## Coding Style
120
+
121
+ Please follow the established coding style in the library. The style is is
122
+ largely based on [The Ruby Style
123
+ Guide](https://github.com/bbatsov/ruby-style-guide) with a few exceptions based
124
+ on seattle-style:
125
+
126
+ * Avoid parenthesis when possible, including in method definitions.
127
+ * Always use double quotes strings. ([Option
128
+ B](https://github.com/bbatsov/ruby-style-guide#strings))
129
+
130
+ You can check your code against these rules by running Rubocop like so:
131
+
132
+ ```sh
133
+ $ cd google-cloud-core/
134
+ $ bundle exec rake rubocop
135
+ ```
136
+
137
+ ## Code of Conduct
138
+
139
+ Please note that this project is released with a Contributor Code of Conduct. By
140
+ participating in this project you agree to abide by its terms. See
141
+ {file:CODE_OF_CONDUCT.md Code of Conduct} for more information.
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Core
19
- VERSION = "1.2.5".freeze
19
+ VERSION = "1.2.6".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.5
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-11 00:00:00.000000000 Z
12
+ date: 2018-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-env
@@ -174,6 +174,9 @@ extensions: []
174
174
  extra_rdoc_files: []
175
175
  files:
176
176
  - ".yardopts"
177
+ - AUTHENTICATION.md
178
+ - CODE_OF_CONDUCT.md
179
+ - CONTRIBUTING.md
177
180
  - LICENSE
178
181
  - README.md
179
182
  - lib/google/cloud.rb