davetron5000-gliffy 0.2.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +12 -7
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -4,6 +4,9 @@ This is the Ruby client library for interacting with Gliffy[http://www.gliffy.co
|
|
4
4
|
|
5
5
|
sudo gem install gliffy
|
6
6
|
|
7
|
+
* Source - http://github.com/davetron5000/gliffy/tree/master
|
8
|
+
* RDoc - http://davetron5000.github.com/gliffy
|
9
|
+
|
7
10
|
= Overview
|
8
11
|
|
9
12
|
The main entry point to Gliffy is Gliffy::Handle, which provides high-level access to most features available from the API. You should instantiate one of these objects per <i>user session</i>. To create it, you will need to create and populate an instance of the Credentials class. This class is constructed almost entirely from static data about your Gliffy account, so you will probably configure an instance of this globally.
|
@@ -148,12 +151,16 @@ All of these save for hanna are installed if you installed the gem.
|
|
148
151
|
|
149
152
|
== Unit Tests
|
150
153
|
|
151
|
-
|
154
|
+
rake test
|
155
|
+
|
156
|
+
This will run unit tests and also create +junit_output.xml+ as a side-effect (via some monkeypatching of Ruby's unit test code); this should be a standard JUnit test result file you could use for integration into your CI server.
|
152
157
|
|
153
|
-
Sometimes the test that two nonces shouldn't be the same fails. This occurs
|
158
|
+
Sometimes the test that two nonces shouldn't be the same fails. This occurs because they are generated in pretty much the same instant AND when the random number generator generates the same number twice in a row. Usually if you run tests again, things pass. This will be *very* unlikely to happen in a production environment.
|
154
159
|
|
155
160
|
== Integration Tests
|
156
161
|
|
162
|
+
rake inttest
|
163
|
+
|
157
164
|
This code is capable of running integration tests against Gliffy's integration test servers.
|
158
165
|
If you would like to run these tests, you must contact Gliffy for the information needed.
|
159
166
|
You could technically run integration tests against your own Gliffy account on their production
|
@@ -170,11 +177,13 @@ have the information from Gliffy, create the file `test/it_cred.rb` as follows:
|
|
170
177
|
|
171
178
|
== Functional Tests
|
172
179
|
|
180
|
+
rake functest
|
181
|
+
|
173
182
|
The functional tests perform actual workflows against a Gliffy server and, as such, are more fragile. If something is wrong in your environment (or with Gliffy), you could leave the test account in a weird state. As such, you should create a new account using a test-only API call. This can be done via
|
174
183
|
|
175
184
|
rake setup_account
|
176
185
|
|
177
|
-
This requires that it_cred.rb is set up and
|
186
|
+
This requires that it_cred.rb is set up and will then run test/setup_account.rb. This will create the file functest_cred.rb with the necessary information to access the newly created account. The accounts seem to get reset every day, so you will not be able to reliably automate this. That being said, the only way to get 100% coverage is to run these tests.
|
178
187
|
|
179
188
|
Each functional test assumes the following:
|
180
189
|
|
@@ -191,7 +200,3 @@ To fully test the edit launch link, run
|
|
191
200
|
rake TEST_LINK=true functest
|
192
201
|
|
193
202
|
This will print out the launch link and pause the testing. Copy/Paste this into your browser to make sure it works and then come back to the console and hit return. Do not do this for automated builds.
|
194
|
-
|
195
|
-
== JUnit output
|
196
|
-
|
197
|
-
I monkeypatched the Ruby unit test classes to output JUnit-style XML when the tests are run. I believe this file gets overridden with each type of test, but you only really should care about it for the `test` target. The file is called `junit_output.xml`.
|