Skip to content

Commit

Permalink
Update yet more PyBee references.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed May 9, 2020
1 parent a7da61c commit 43dea90
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ local
# PyCharm
.idea/
*.iml

# VS Code
.vscode/
4 changes: 2 additions & 2 deletions docs/background/community.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ Contributing
If you experience problems with Rubicon, `log them on GitHub`_. If you
want to contribute code, please `fork the code`_ and `submit a pull request`_.

.. _BeeWare suite: http://pybee.org
.. _BeeWare suite: http://beeware.org
.. _Read The Docs: https://rubicon-objc.readthedocs.io
.. _@pybeeware on Twitter: https://twitter.com/pybeeware
.. _beeware/general: https://gitter.im/beeware/general
.. _log them on Github: https://github.com/beeware/rubicon-objc/issues
.. _fork the code: https://github.com/beeware/rubicon-objc
.. _submit a pull request: https://github.com/beeware/rubicon-objc/pulls

.. _Code of Conduct: http://pybee.org/contributing/index.html
.. _Code of Conduct: http://beeware.org/contributing/index.html
.. _Russell Keith-Magee: mailto:russell@keith-magee.com
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

# General information about the project.
project = 'Rubicon'
copyright = '2018, Russell Keith-Magee'
copyright = '2014, Russell Keith-Magee'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
11 changes: 7 additions & 4 deletions docs/how-to/contribute-code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ How to contribute code to Rubicon
If you experience problems with Rubicon, `log them on GitHub`_. If you want
to contribute code, please `fork the code`_ and `submit a pull request`_.

.. _log them on Github: https://github.com/pybee/rubicon-objc/issues
.. _fork the code: https://github.com/pybee/rubicon-objc
.. _submit a pull request: https://github.com/pybee/rubicon-objc/pulls
.. _log them on Github: https://github.com/beeware/rubicon-objc/issues
.. _fork the code: https://github.com/beeware/rubicon-objc
.. _submit a pull request: https://github.com/beeware/rubicon-objc/pulls

.. _setup-dev-environment:

Expand All @@ -22,7 +22,10 @@ coding:
$ python3 -m venv venv
$ source venv/bin/activate.sh
(venv) $ git clone https://github.com/pybee/rubicon-objc.git
(venv) $ pip install --upgrade pip
(venv) $ pip install --upgrade setuptools
(venv) $ pip install tox
(venv) $ git clone https://github.com/beeware/rubicon-objc.git
(venv) $ cd rubicon-objc
(venv) $ pip install -e .
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ stand alone.
:maxdepth: 2
:glob:

Get started <get-started>
get-started
type-mapping
protocols
async
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ Rubicon is part of the `BeeWare suite`_. You can talk to the community through:

* `@pybeeware on Twitter`_

* `pybee/general on Gitter`_
* `beeware/general on Gitter`_

.. _BeeWare suite: http://pybee.org
.. _BeeWare suite: http://beeware.org
.. _Read The Docs: https://rubicon-objc.readthedocs.io
.. _@pybeeware on Twitter: https://twitter.com/pybeeware
.. _pybee/general on Gitter: https://gitter.im/pybee/general
.. _beeware/general on Gitter: https://gitter.im/beeware/general


.. toctree::
Expand Down
16 changes: 8 additions & 8 deletions docs/tutorial/tutorial-1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Let's create an instance of an `NSURL` object. The `NSURL` documentation
describes a static constructor `+URLWithString:`; we can invoke this
constructor as::

>>> base = NSURL.URLWithString("http://pybee.org/")
>>> base = NSURL.URLWithString("https://beeware.org/")

That is, the name of the method in Python is identical to the method in
Objective-C. The first argument is declared as being an `NSString *`; Rubicon
Expand All @@ -54,7 +54,7 @@ can't repeat a keyword argument in a method call. In this case, you can use a
"long form" of the method to explicitly invoke a descriptor by replacing
colons with underscores::

>>> base = NSURL.URLWithString_("http://pybee.org/")
>>> base = NSURL.URLWithString_("https://beeware.org/")
>>> full = NSURL.URLWithString_relativeToURL_("contributing", base)

Instance methods
Expand All @@ -65,7 +65,7 @@ So far, we've been using the `+URLWithString:` static constructor. However,
method, you first have to instruct the Objective-C runtime to allocate memory
for the instance, then invoke the initializer:

>>> base = NSURL.alloc().initWithString("http://pybee.org/")
>>> base = NSURL.alloc().initWithString("https://beeware.org/")

Now that you have an instance of `NSURL`, you'll want to manipulate it.
`NSURL` describes an `absoluteURL` property; this property can be
Expand All @@ -81,22 +81,22 @@ If you want to output an object at the console, you can use the Objective-C
property `description`, or for debugging output, `debugDescription`::

>>> longer.description
'http://pybee.org/contributing/how/first-time/'
'https://beeware.org/contributing/how/first-time/'

>>> longer.debugDescription
'http://pybee.org/contributing/how/first-time/>'
'https://beeware.org/contributing/how/first-time/>'

Internally, `description` and `debugDescription` are hooked up to their Python
equivalents, `__str__()` and `__repr__()`, respectively::

>>> str(absolute)
'http://pybee.org/contributing/how/first-time/'
'https://beeware.org/contributing/how/first-time/'

>>> repr(absolute)
'<rubicon.objc.api.ObjCInstance 0x1114a3cf8: NSURL at 0x7fb2abdd0b20: http://pybee.org/contributing/>'
'<rubicon.objc.api.ObjCInstance 0x1114a3cf8: NSURL at 0x7fb2abdd0b20: https://beeware.org/contributing/>'

>>> print(absolute)
<rubicon.objc.api.ObjCInstance 0x1114a3cf8: NSURL at 0x7fb2abdd0b20: http://pybee.org/contributing/>
<rubicon.objc.api.ObjCInstance 0x1114a3cf8: NSURL at 0x7fb2abdd0b20: https://beeware.org/contributing/>

Time to take over the world!
============================
Expand Down

0 comments on commit 43dea90

Please sign in to comment.